BUG Fix undefined index ID
Merge pull request #2621 from tractorcow/pulls/3.1-undefined-index

BUG Fix undefined index ID
NEW: GridField can sort on relation columns

Slightly improved logic

Add support for relations more than one 'level' apart

Add unit tests

Fixing PostgreSQL support