-
-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline field denormalization for Reference* mapping #613
Comments
I have implemented this for a long time for sharding: see #325 |
I've started working on this a while ago (see #1527), but this won't make much sense until we've got the new array update operators that allow us to keep the data in sync (if the user so wishes). |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
@alcaeus can we 'un-stale-ify' this ? :) |
@techbelle this is part of the 2.x milestone, so it won't be marked as stale again. That said, I haven't managed to make any progress on this or on the previously mentioned update operators, which IMO should take precedence over this. |
Think of the following two documents:
The mongo stored documents for surveys would look like:
So that if you do the following, no extra finds will be triggered unless the field wasn't embedded in the referenced document data:
Updates to the question may cascade unless configured to not do so, or the other way around. In most of my cases, a cascade can occur.. but if someone happens to use this feature on an active database with many records, then shit can hit the fan!
It'd be easy to create a document and manage it as if it were it's own document and just associate that to one thing and be embedded. I tend to use it this way in many cases... thus would limit many finds.
Another thing that can also solve this problem is to introduce caching, but that's another topic.
The text was updated successfully, but these errors were encountered: