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
Following the documentation, I'm trying to filter a query by a list of string primary ids I have. However, when using the IN operator as part of the query I can never seem to get it to work. Apologies if this is not actually a bug, but perhaps an example of the IN operator is due in the documentation if I'm just doing this wrong. I give an example below
Stacktrace & log output
[Unhandled promise rejection: Error: Exception in HostFunction: Unsupported comparison between type'string' and type'link']
Can you reproduce the bug?
Yes, always
Reproduction Steps
The error above is produced when I attempt to use the IN operator on any field (indexed, non-indexed, string, not string, primary key, etc).
const test = ['foo']; realm.objects('QueuedItem').filtered('mediaCategory IN $0', test)
Version
10.20.0-beta.5
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iOS 15.5
Build environment
Expo
Cocoapods version
No response
The text was updated successfully, but these errors were encountered:
Unfortunately, the IN operators right hand operand needs to be a list on a Realm object which is already in the database.
That is, unfortunately you cannot supply an array as the value to replace the placeholder.
As an alternative you can use the OR operator to achieve the same:
How frequently does the bug occur?
All the time
Description
Following the documentation, I'm trying to filter a query by a list of string primary ids I have. However, when using the IN operator as part of the query I can never seem to get it to work. Apologies if this is not actually a bug, but perhaps an example of the IN operator is due in the documentation if I'm just doing this wrong. I give an example below
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
The error above is produced when I attempt to use the IN operator on any field (indexed, non-indexed, string, not string, primary key, etc).
const test = ['foo']; realm.objects('QueuedItem').filtered('mediaCategory IN $0', test)
Version
10.20.0-beta.5
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iOS 15.5
Build environment
Expo
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: