Skip to content

Support project() method for CouchbaseTemplate.findByQuery() queries #1208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
khanium opened this issue Aug 31, 2021 · 3 comments · Fixed by #1212
Closed

Support project() method for CouchbaseTemplate.findByQuery() queries #1208

khanium opened this issue Aug 31, 2021 · 3 comments · Fixed by #1212
Labels
type: enhancement A general enhancement

Comments

@khanium
Copy link

khanium commented Aug 31, 2021

Currently, CouchbaseTemplate.findById() has a method project( fieldnames array ) that allows filter fields to project for a findById query.

Request
Add findByQuery().project() method for projecting only a given list of fields.

@khanium
Copy link
Author

khanium commented Aug 31, 2021

There is a .as(ClassType) that would allow do similar actions but it requires to define a projection class for that. It would be better also have project(array of string fieldnames) method

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 31, 2021
@mikereiche
Copy link
Collaborator

Thanks for your input. Is there such a feature in another spring data project we could follow?
Returning a Map<String,Object> might be a better result - all the data is not always String and also so the caller could know which Object was which property.

@AV25242
Copy link

AV25242 commented Sep 9, 2021

Hello @khanium findByQuery().project(string[] ) should be made available with the next spring release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
4 participants