propelorm/Propel — pull request #359 by rozwell (2012-05-11 00:30:36+00:00)
Title: Improved sortable behavior - fixes some inconsistencies

Changes:
* added native moving between scopes when scope value was changed and rank not (if rank was changed - we assume superior change)
* regular saving objects with empty/null scope was setting correct rank but methods like __insertAtBottom()__ didn't allow inserting in null scope (lack of consistency?)
It is now possible to use those methods in null scope (why not?).
See: native sorting in sfPropelORM admin generator
* __removeFromList()__ was clearing both, scope and rank column and breaking good structure in null scope.
Now it moves object to the end of null scope
* __swapWith()__ can now fully operate between scopes - previously it would only exchange ranks, which was fine for the same scope, but would break the structure in both scopes (no exception was thrown)

****

There are some other issues like when scope column is a FK and onDelete="setnull", removing related/scope object will only clean the scope value leaving ranks untouched.