@Query("UPDATE users SET " + "email=:email," + "locale=:locale," + "created_time=:created_time," + "updated_time=:updated_time," + "verified_time=:verified_time," + "time_zone=:time_zone," + "status=:status," + "mobile_phone=:mobile_phone," + "full_name=:full_name " + "WHERE id=:id " + "IF email=:email AND mobile_phone=:mobile_phone") Statement updateUser( @Param("id") UUID id, @Param("email") String email, @Param("locale") String locale, @Param("created_time") Date createdTime, @Param("updated_time") Date updatedTime, @Param("verified_time") Date verifiedTime, @Param("time_zone") String timeZone, @Param("status") UserStatus status, @Param("mobile_phone") String mobilePhone, @Param("full_name") String fullName);
java.lang.IllegalArgumentException: The number of arguments for method updateUser (10) does not match the number of bind parameters in the @Query (12)
--
Olivier Michallat
Driver & tools engineer, DataStax
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.
Hi,That's a bug. The driver compares with the number of bindings without taking into account duplicate names.Could you create a ticket? Our issue tracker is at https://datastax-oss.atlassian.net/browse/JAVAOn a side note, why do you set email and phone again, given that you've already checked their value in the IF clause?