-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix findOne
/find
wrt _id
column (actually all filterables)
#1359
Conversation
Ok, this turns out to be rather difficult to solve: basically Line 336 in 24af4e2
which creates value type not matched by filter resolved for Tables. Conceptually it'd be good for deserializer to skip this special handling for Tables, but piping through that information proves difficult given that deserialization is invoked by Quarkus, via type on endpoint. |
(BigDecimal) filterOperation.operand().value())); | ||
(BigDecimal) rhsValue)); | ||
} else if (captureExpression.marker() == DYNAMIC_DOCID_GROUP) { | ||
Object actualValue = ((DocumentId) rhsValue).value(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be refactored to avoid duplicating code to create Text/NumberTableFilter.
findOne
/find
wrt _id
columnfindOne
/find
wrt _id
column (actually all filterables)
} | ||
} else { | ||
throw new UnsupportedOperationException( | ||
"Unsupported dynamic filter type: " + filterOperation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is just following the pattern. We can change these to Data API exception later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry I missed this one before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I confirmed yesterday that this works in stargate/stargate-mongoose-sample-apps#397 |
Thank you for verifying @vkarpov15 ! |
What this PR does:
Fixes handling of
_id
column wrt Find operations: there is something specific about this compared to all other ids (quoted or not)Which issue(s) this PR fixes:
Fixes #1357
Checklist