fixed ambiguous column error when order a model mapped against more
than one database table by the duplicate-named column.
revert previous commit
Use SQLAlchemy-provided way to get primary_key, as a solution of the
problem when a model is mapped against a SQLAlchemy Join object.
Add SQLAlchemy v0.7.x compatibility
Merge pull request #634 from Cosmius/master

Use SQLAlchemy-provided way to get primary_key, as a solution of the problem when a model is mapped against a SQLAlchemy Join object.