【发布时间】:2017-01-25 12:51:32
【问题描述】:
我想轻松查询这样的结果:
[{
name: 'john_doe',
info: {
age: 24,
notes: 'custom text',
phoneNumbers: {
home: 112345678,
work: 1234567,
},
},
}, {...}, {...}...]
...通过这样的查询:
contacts.filtered("info.age = 24 AND info.notes CONTAINS 'custom'");
我应该如何创建这样的架构?文档对数据类型和嵌套属性非常困惑:
- https://realm.io/docs/react-native/0.14.0/api/Realm.html#~PropertyType
- https://realm.io/docs/react-native/latest/#nested-objects
我不需要单独检索此数据的任何部分 - 只需一次包含所有嵌套对象的完整对象。
【问题讨论】:
标签: react-native realm