Skip to content
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

For properties saved by a different name with @Field annotation, query predicates are on the original name. #1055

Closed
mikereiche opened this issue Jan 19, 2021 · 2 comments

Comments

@mikereiche
Copy link
Collaborator

For properties saved by a different name with @field annotation, query predicates are on the original name.
The QueryCriteria should be created with getFieldName()

https://forums.couchbase.com/t/couchbase-springdata-4-1-1-and-boot-2-4-query-error/29100/9

@mikereiche
Copy link
Collaborator Author

mikereiche commented Jan 19, 2021

The converter in N1qlQueryCreator needs to use getFieldName() instead of getName()

static Converter<? super CouchbasePersistentProperty, String> cvtr = (
		source) -> new StringBuilder(source.getFieldName().length() + 2).append('`').append(source.getFieldName()).append('`')
				.toString();

@mikereiche
Copy link
Collaborator Author

Fixed by 41ee1f9
Fixed in 4.3.0-M1 4.2.3 4.2.2 4.2.1 4.2.0 4.2.0-RC1 4.2.0-M5 4.2.0-M4 4.2.0-M3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant