You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tought that the solution to my problem would have been the Referenced Model. As odmatic's documentations states in the modeling chapter "Another use case where references are useful is for one-to-one/one-to-many relations but when the referenced model has to exist in its own collection, in order to be accessed on its own without any parent model specified."
This seems to be the perfect use case scenario, but i noticed that Reference Model does not permit to retrieve any attribute from the referenced model, except from the objectId (or any primary key i'm guessing).
Am i correct? Or I am missing something?
If I'm correct, wouldn't be a nice feature to be able to use Referenced model to retrieve also other attribute other than the primary key? This will permit to implement the Extended Reference Pattern.
Probably i could user Embedded Models, but then i will lose the possibility to have the check that the Embedded model exist, am i right?
Thanks in advice!
The text was updated successfully, but these errors were encountered:
I wanted to implement the Extended Reference Pattern using odmantic, as explained in this mongodb article https://www.mongodb.com/blog/post/building-with-patterns-the-extended-reference-pattern.
I tought that the solution to my problem would have been the Referenced Model. As odmatic's documentations states in the modeling chapter "Another use case where references are useful is for one-to-one/one-to-many relations but when the referenced model has to exist in its own collection, in order to be accessed on its own without any parent model specified."
This seems to be the perfect use case scenario, but i noticed that Reference Model does not permit to retrieve any attribute from the referenced model, except from the objectId (or any primary key i'm guessing).
Am i correct? Or I am missing something?
If I'm correct, wouldn't be a nice feature to be able to use Referenced model to retrieve also other attribute other than the primary key? This will permit to implement the Extended Reference Pattern.
Probably i could user Embedded Models, but then i will lose the possibility to have the check that the Embedded model exist, am i right?
Thanks in advice!
The text was updated successfully, but these errors were encountered: