You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with spring-boot 2.3.5.RELEASE and vavr 0.10.3 and I have this error when I try to invoke the method disableEnabledCredentials() defined in this way:
publicinterfaceICredentialDAOextendsRepository<Credential, String> {
@Modifying@Query("update Credential d set d.enabled = false where d.enabled = true")
Try<Integer> disableEnabledCredentials();
Option<Credential> findByEnabled(booleanenabled);
Try<Credential> save(Credentialcredential);
}
When I invoke the disableEnabledCredentials() method I get the following error:
"Modifying queries can only use void or int/Integer as return type!"; nested exception is java.lang.IllegalArgumentException: Modifying queries can only use void or int/Integer as return type!
I know that vavr is supported by spring-data-jpa because I has using this features in other methods as findByEnabled() or save().
The support by vavr should't include @Modifying allowing return of Try<Void> or Try<Integer>?
Juan Pablo Bochard opened DATAJPA-1827 and commented
I'm working with spring-boot 2.3.5.RELEASE and vavr 0.10.3 and I have this error when I try to invoke the method disableEnabledCredentials() defined in this way:
When I invoke the disableEnabledCredentials() method I get the following error:
"Modifying queries can only use void or int/Integer as return type!"; nested exception is java.lang.IllegalArgumentException: Modifying queries can only use void or int/Integer as return type!
I know that vavr is supported by spring-data-jpa because I has using this features in other methods as findByEnabled() or save().
The support by vavr should't include
@Modifying
allowing return of Try<Void> or Try<Integer>?My pom includes:
Affects: 2.3.5 (Neumann SR5)
Referenced from: pull request #438
Backported to: 2.4.3 (2020.0.3), 2.3.7 (Neumann SR7)
The text was updated successfully, but these errors were encountered: