-
Notifications
You must be signed in to change notification settings - Fork 309
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
Using a PropertyQuery on an @Id field #1028
Comments
There is |
Without additional information, we are unfortunately not sure how to resolve this issue. Therefore this issue has been automatically closed. Feel free to comment with additional details and we can re-open this issue. |
First of all, sorry for the delay.
Do you mean something like that ? builder.link(GroupItem_.content).build().findIds() ... because when I do so, ObjectBox tells me
I'm ending up either coding my query the other way around, when there's a Really, having a specific |
@greenrobot-team please consider reopening that one. Thanks in advance |
This actually looks like something that makes sense to allow... |
Relation properties are now allowed for PropertyQuery using long internally. This will be part of the next release (no date yet). |
Fan-tas-tic ! Thanks @greenrobot |
Also closing as fixed, will ship with the next release. |
Fix now available with release |
Using ObjectBox v3.0.1
As I'm building rather complex queries, I sometimes need to extract IDs to intersect them using Java streams & collections.
I'm trying to do that using PropertyQueries, e.g.
Where
GroupItem_.contentId
is inside aToOne
relationWhen doing that, ObjectBox crashes with the following message
As that case isn't documented, I wondered if it is a bug, uncharted territory, or if it could get a fix.
For instance I wouldn't mind using something like
PropertyQuery.findTargetIds
instead ofPropertyQuery.findLongs
if it could make its way to the proper result.If it is not supported at all, could you please make the message more explicit (e.g. "Querying relation Ids with a PropertyQuery is not supported") ?
PS : Current workaround I found is to code my query the other way around, but I hate to use these double links
The text was updated successfully, but these errors were encountered: