Closed
Description
Say you have following document.
@Document
@Scope("someScope")
@Collection("someCollection")
public class User {
@Id
private String id;
private String name;
}
and following repository
@Repository
public interface UserRepository extends CouchbaseRepository<User, String>, QuerydslPredicateExecutor<User> {
}
when executing the findAll(Predicate)
via QuerydslPredicateExecutor the collection name of the document ignored and everything is executed against the _default
collection.
@Service
class UserService {
@Autowired
UserRepository userRepository;
public Page<User> findUsers(){
return userRepository.findAll(QUser.user.name.isNotNull(), PageRequest.of(0, 10));
}
}
Seems the SpringDataCouchbaseQuery
does not try to resolve the collection from the provided java type.