pop
pop copied to clipboard
Eager Save appears to not persist children in one-to-many and many-to-many relations
Description
If I try to Save instead of Creating a model in my DB any relations I define will not be persisted. This is probably related to issue #136
Steps to Reproduce the Problem
Within a transaction call tx.Eager().Save(model)
or tx.Eager().ValidateAndSave(model)
Expected Behavior
The model is persisted with its children.
Actual Behavior
Only the model is persisted, the children are not
Info
I'm using Pop v5.0.11 on Linux with a Postgres db.
Do you think it's related to https://github.com/gobuffalo/buffalo/issues/1980? In this case even the model isn't being persisted.
Do you think it's related to gobuffalo/buffalo#1980? In this case even the model isn't being persisted.
No the error I'm referring to is on the DB layer, not on the API layer. The model is persisted when I execute Save, but any relationships to it are not.