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
@RepositorypublicinterfaceThingRepoextendsCouchbaseRepository<Thing, String> {
@Query("#{#n1ql.selectEntity} WHERE #{#n1ql.filter} AND secondaryId = $secondaryId")
@ScanConsistency(query = QueryScanConsistency.REQUEST_PLUS)
Optional<Thing> getBySecondaryId(StringsecondaryId);
}
Will not attempt to look at the scan consistency annotation. It will also ignore it if you leave the annotation off and rely on the N1qlQueryCreator. See N1qlRepositoryQueryExecutor. The consistency will always be the default unbounded. The @WithConsistency annotation is also ignored.
I found this while migrating from 3.x to 4.0.3 and executing unit tests that use "save" to persist an entity and then call something similar to "getBySecondaryId" on the following line.
blitzenzzz opened DATACOUCH-605 and commented
A Repository shaped like this:
Will not attempt to look at the scan consistency annotation. It will also ignore it if you leave the annotation off and rely on the N1qlQueryCreator. See N1qlRepositoryQueryExecutor. The consistency will always be the default unbounded. The
@WithConsistency
annotation is also ignored.I found this while migrating from 3.x to 4.0.3 and executing unit tests that use "save" to persist an entity and then call something similar to "getBySecondaryId" on the following line.
Documentation reference - https://docs.spring.io/spring-data/couchbase/docs/current/reference/html/#couchbase.repository.consistency
Affects: 4.0.3 (Neumann SR3)
Backported to: 4.0.5 (Neumann SR5)
The text was updated successfully, but these errors were encountered: