nova-attach-many
nova-attach-many copied to clipboard
Is there support for pivot custom fields?
#45
To document this a little further, I was looking for this as well because I needed associated records to be created with default values (JSON fields can't have default values in the DB).
I wanted my ModelA
to have 3 ModelB
created automatically after being created. So I setup an Observer to listen for the created call and just create them afterwards but despite being able to see them being created in the logs, seeing the DB inserts go through etc, those models were nowhere to be found, they just disappeared.
So if your associated models are disappearing, make sure that you're disabling this package from the create view because the call to the function "sync" that is done in the package will delete any other association you're manually creating. And it's a PAIN to diagnose ahah.
I wanted to write this somewhere in case anybody ended up looking for their disappearing models because I found nothing on Google (pretty logical).