Closed markusreis-yd closed 7 months ago
I'll try to take a look sometime this week before some holidays here
If you are able to submit a PR in the meantime that I can review, I would really appreciate that. Thank you!
Hey Jonathon, created a pull request. I didn't deeply check but it fixes the error on my end and the inverse relationship still gets set
cheers
Thank you! I will review this evening my time!
Hey there,
I am not quite sure if I am right, but shouldn't this line check, if an ID exists / the model property
is_null
? You already do the isUpdating check in the respective SavingListeners (eg. EntrySavingListener) but then you try to clone it anyways in the DB-Check Method.When I create a new entry within my collection, I get the exception
[2023-11-20 09:23:33] local.ERROR: __clone method called on non-object {"userId":1,"exception":"[object] (Error(code: 0): __clone method called on non-object at /var/www/html/vendor/stillat/relationships/src/Listeners/BaseListener.php:15)
When I update an existing entry, everything is fine.