add ordering based on foreignkey
Merge pull request #4 from hcliff/feature/foreignkey-ordering

add ordering based on foreignkey