I'm working on realm to make it work offline as local db in Electron. Now I want to make join(aggregation), so I defined a relationship between two schema's but then the data is not getting synced. It would be great to get help.
Here's my schema:
const articleMetaSchema = { name: 'articlemeta', properties: { _id: 'objectId?', catalog_id: 'objectId?', content: 'objectId?', createdAt: 'date?', description: 'string?', main_image_url: 'string?', origin_type: 'string?', pub_date: 'date?', publication: 'objectId?', sub_title: 'string?', title: 'string?', updatedAt: 'date?', url: 'string?' }, primaryKey: '_id' } const articleSchema = { name: 'article', properties: { _id: 'objectId?', active_search: 'bool?', article_meta: 'articlemeta?', catalog_id: 'objectId?', content: 'objectId?', createdAt: 'date?', flagged: 'bool?', owner_id: 'objectId?', rating: 'int?', read: 'bool?', status: 'string?', status_updated_at: 'date?', updatedAt: 'date?' }, primaryKey: '_id' }
https://stackoverflow.com/questions/66558599/realm-read-data-with-relationship March 10, 2021 at 12:55PM
没有评论:
发表评论