-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
SDK end 2020-04-07
-
2763
Goals
I am trying to fetch some objects from database.
Expected Results
Getting 1 object with all properties.
Actual Results
I get Results of length 1 but when getting the object via index 0, it returns no properties.
Steps to Reproduce
Run the code on Android
Code Sample
const results = realm .objects<ImporterAuthenticationModel>(ImporterAuthenticationModel.schema.name) .filtered('importerId = $0', importer.importer.id); if (results) { console.log(results.length); console.log(results[0].id); }
Output is:
1 undefined
Schema:
export class ImporterAuthenticationModel extends BaseModel { public static schema = { ...BaseModel.schema, name: 'ImporterAuthenticationModel', primaryKey: 'uniqueId', properties: { ...BaseModel.schema.properties, uniqueId: 'string', id: 'string', title: 'string', subTitle: 'string?', imageUrl: 'string?', importerId: 'string', additionalDataString: 'string?', rawStatus: { type: 'int', default: ImporterAuthenticationStatus.AUTHENTICATED }, expiresAt: 'int' } };
Version of Realm and Tooling
- Realm JS SDK Version: 5.0.0
- Node or React Native: React Native
- Client OS & Version: Android 9PKQ1.181121.001 (Mi 9 Lite)
- Which debugger for React Native: React Native Debugger (but it also fails if using production build from FireBase)