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 have been having a hard time connecting odmantic with raw mongo. I have a value that I know exists in some of my embedded models. What I would like to to give issue a query to remove all instances of those embedded models that include that value in a specific filed of the object. I know with base mongo you can do $pull to accomplish this how would you go about doing this in odmantic. If I just need to get the underlying engine that is fine I was just wandering.
The text was updated successfully, but these errors were encountered:
Caindrac
changed the title
Embedded Model Removal
Embedded Model Removal Question
Mar 2, 2021
For now the only way to do this with ODMantic would be to fetch all the instances and do the filtering locally. However, this is highly suboptimal and as you mentioned the best way is to use the engine directly.
#248 should add some atomic update operators. Could you precise your use case, maybe with a little example, so I can make sure the feature will cover it
I have been having a hard time connecting odmantic with raw mongo. I have a value that I know exists in some of my embedded models. What I would like to to give issue a query to remove all instances of those embedded models that include that value in a specific filed of the object. I know with base mongo you can do $pull to accomplish this how would you go about doing this in odmantic. If I just need to get the underlying engine that is fine I was just wandering.
The text was updated successfully, but these errors were encountered: