Skip to content

QuerydslPredicateExecutor Does not Respect collection of the document. #1866

Closed
@babltiga

Description

@babltiga

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions