bshaffer/csDoctrineActAsSortablePlugin — pull request #12 by m14t (2011-11-29 01:34:54+00:00)
Title: Duplicate Index check fails when modifying a `uniqueBy` column 

Steps to reproduce:

1. Create a Sortable Class with at least one uniqueBy column (we'll use `cat_id` in this example).
2. Create 3 objects with a `cat_id` of 1. They should have positions 1, 2, and 3.
3. Create 1 objects with a `cat_id` of 2. It should have a position of 1.
4. Try and move the most recent object from `cat_id` 2 to `cat_id` 1.
5. Observe the `Doctrine_Connection_Sqlite_Exception` thrown.

This Pull Request simply adds a few extra test cases and a preUpdate listener that will move an object to the end of the list if it is changing categories.

This seems to address the same issue as https://github.com/bshaffer/csDoctrineActAsSortablePlugin/pull/11, but with out the side effects.