DB/ORM/Collection: Allow sorting by nested attributes