Nested documents #259
Replies: 5 comments 17 replies
-
This only works for simple use-cases where collections aren't nested. For complex ones like yours, you'll have to do a |
Beta Was this translation helpful? Give feedback.
-
Could nested documents be a feature, like a |
Beta Was this translation helpful? Give feedback.
-
Hum, totally ran into an issue. In the original example, when saving account.setProperties({...data});
await account.save() The |
Beta Was this translation helpful? Give feedback.
-
With recent v3.1.0 release, your use-case should be satisfied now. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to preload relationships? I.e. |
Beta Was this translation helpful? Give feedback.
-
I noticed that there are
buildReference
on the relationships, and I tried to utilize those to do fetching of nested relationships but it's practically impossible because you needs ids to build out those references.Here's one example:
Notice how I couldn't do
account.set('mainFeed', feed)
, because the reference there would befeed/{id}
notaccounts/{username}/feeds/{id}
. This is even more prevalent when fetching, you need that context from the parent, and it's parent, etc.Not sure what can be done.
Beta Was this translation helpful? Give feedback.
All reactions