I’m curious whether this is even possible.
Basically I have two related models. I’m wondering if it’s possible to save both models as a transaction, automatically populating the foreign key of the second model with the new insert id of the first.
I know that this can be done by saving the models separately, but my question is whether it can be done as one save.
Thanks!
I ended up doing this by using after/before saves and modifying the data. I passed the id around using the registry.
My Solution