franzose/ClosureTable — pull request #107 by tomzx (2014-04-14 03:12:56+00:00)
Title: Fixes to Entity when specifying an initial position

Hello @franzose,

This PR fixes 2 issues related to the Entity when we give them an initial position before saving. Without this fix, the passed position is basically ignored and the position saved is the last for the parent given.

Furthermore, it includes the `$this->old_parent_id = false;` change that is required when creating a new entity otherwise it'll assume that the `old_parent_id` and the `parent_id` are the same (which is `NULL`). This way, setupReordering thinks the ancestor has changed, which uses the appropriate logic.

Hopefully all those fixes are getting us toward a stable and functional release :smile: