The nested relationship model is often not yet available in the parent object observer created() method
scadh opened this issue · comments
Steve Ainsworth commented
I am experiencing an issue where my parent object and nested relation are both saved correctly to their respective tables, but the parent model object passed to it's Observer created() method does not contain the nested relationship because it hasn't yet been created. The created() method passes the parent model off to an email mechanism that relies upon some data inside the child object and fails when that data evaluates to null. Is there any way to specify that the nested object(s) be stored first so that that parent relation method can find them? Or some other solution I could employ?