Filtering does not work on large numbers



We’ve come across a problem where large number used in filtering do not work. We are using Realm in ReactNative, but the problem can be seen from Realm Studio as well. Please consider the following tablw ith two entries, one with a 13 digit key, another with a 18 digit key.

The smaller one will be found while filtering

The larger one will not


Hmm, the larger one still in the integer max?


From the documentation
“int, float, and double properties map to JavaScript number values. Internally ‘int’ and ‘double’ are stored as 64 bits while float is stored with 32 bits.”
So int should be able to store up to,223,372,036,854,775,807
But now that i’m looking into this, maybe it should not exceed JS max safe int which is 9007199254740991 ?
If so, it probably should be worth noting this in the documentation…


I’m just guessing here :slight_smile:
It seems that the storing is okay, the query parameter has a type issue.


I’m not sure what you mean by type issue. That could be the case if I was seeing this behavior only in my JS code. But this is also a problem in Realm Studio… Or are you saying it is a bug with Realm? :slight_smile: