You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting. I think this is a bug in the query builder. When the sort is used, the composite key [uid, name] is emitted but the query keys is non composite keys.
Yes, the bug is that the builder tries to do the sort at index time by adding the sort key to the emitted key, but that's not compatible with using an IN test in the predicate, because that requires exact key equality.
I've fixed the builder code to leave the emitted key alone if the predicate uses IN. Thanks a lot for providing a unit test! That made this a lot easier to debug and verify. I'm checking in in a modified version of the test.
The best workaround I can think of is to leave out the sort descriptor in the query builder, and then sort the returned rows yourself. For example you can do [e.allObjects sortedArrayUsingDescriptors: ...]. This is basically what the query builder would be doing anyway.
I write this test case in file QueryBuilder_Tests.m for reappearing my issue:
The text was updated successfully, but these errors were encountered: