Ref #347. Ported propelorm/propel#616.
Merge pull request #388 from marcj/sortable

Ref #347. Ported propelorm/propel#616.