Hi,
I have two questions on saving related Models. Please see "has-many relation" example at https://docs.phalcon.io/en/latest/reference/models.html#storing-related-records.
1) Why do I arrive in Album::afterSave() before related models Songs are saved? To me it looks like an incorrect behaviour, as I might want to perform additional actions depending on the outcome of saving of related objects.
2) The following assignment of related Models works as expected:
$album->songs = $songs;
However, the following does not save any Related models:
class Album
{
public function beforeSave()
{
$this->songs = $songs;
}
}
This looks like a bug.
Any comments?
Thanks!