Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- realm = new Realm({
- path: 'DeviceDB.realm',
- schema: [
- {
- name: 'Schedule',
- primaryKey: 'id',
- properties: {
- id: 'int',
- startingTime: 'string',
- endingTime: 'string'
- },
- },
- {
- name: 'user_devices',
- primaryKey: 'id',
- properties: {
- id: 'int',
- schedules: 'Schedule[]',
- dev_name: 'string',
- dev_serial: 'string'
- },
- },
- ],
- });
- const devs = realm.objects('user_devices').filtered('id =' + this.state.deviceId);
- const fetched_schedules = devs.schedules;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement