-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
2 - S (<= 1 week)
-
2500
<!---
Questions: If you have questions about HOW TO use Realm, please ask on
StackOverflow: http://stackoverflow.com/questions/ask?tags=realm
We monitor the realm tag.
Feature Request: Just fill in the first two sections below.
Bugs: To help you as fast as possible with an issue please describe your issue
and the steps you have taken to reproduce it in as much detail as possible.
-->
Goals
I'm trying to add an entity into Realm and then read and list it in another scene.
Expected Results
The data that is read is supposed to be rendered as a list. It does happen but the data itself is not present.
Actual Results
The data is saved to the database and is subsequently read from the database. A single item is rendered to the list, but all its values are empty. When clicking the item, a new screen opens which showcases all the data from that specific item (the item itself only shows 2 of the details)
This only happens if I'm not running the React Native debugger. I've generated the debug APK for testing purposes and the error still persisted.
Steps to Reproduce
I'm not sure what can be done to reproduce this. I'm saving one item to a schema and later reading it. The data is retrieved but all the values in it are empty.
Code Sample
1.This is the code that reads the data from the database. None of the values are undefined or null. This return the blank data when not using the debugger:
const data = realm.objects('Visita').filtered(`matricula == '${this.props.matricula}' AND idObra == ${this.props.data.id}`)
- This is the code that created the data prior to it being read in another page:
getRealm() .then(realm => { /*Some boilerplatecode*/ realm.write(() => { realm.create('Visita', visita) })
- This is the schema that is being added:
export default class VisitaSchema { static schema = { name: 'Visita', primaryKey: 'idVisita', properties: { idVisita: { type: 'int', indexed: true }, descricao: 'string', latitude: 'string', longitude: 'string', matricula: 'string', idObra: 'int', data: 'string' } } }
Version of Realm and Tooling
- Realm JS SDK Version: ?
- Node or React Native: ?
- Client OS & Version: ?
- Which debugger for React Native: ?/None