Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Saving a node causes it to attempt to also move the node to itself. #296
I'm not sure what I'm doing wrong. But if I try to update a Baum node using Laravel/Eloquent and just use the save() method, it fires the Eloquent 'saved' event, which causes Baum to call moveToNewParent. But since I'm updating a node that doesn't actually need to be moved, it errors out with:
My solution to this problem is to modify the moveToNewParent() method like so:
Something doesn't feel right about this solution though, since I can't be the first to try to update a node without trying to move it.
What am I doing wrong?