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
When I have two models that are linked to each other via a One-To-Many list of references, a cascading save seems to not work.
Run the following code and observe in your database how User is saved, but Comment is not. In other scenarios I have seen this to fail with a ValidationError (because the reference cant be resolved), but in this example it seems to fail silently.
I have tried using the setting "cascade": True on the "meta" variable of the document instead, but the effect is the same.
When I have two models that are linked to each other via a One-To-Many list of references, a cascading save seems to not work.
Run the following code and observe in your database how User is saved, but Comment is not. In other scenarios I have seen this to fail with a ValidationError (because the reference cant be resolved), but in this example it seems to fail silently.
I have tried using the setting "cascade": True on the "meta" variable of the document instead, but the effect is the same.
The text was updated successfully, but these errors were encountered: