Allow empty relationships for HasOne and BelongsTo.
Implement orderBy method on Query object
Half-assed implementation of orderBy.
Fixes
merge in upstream changes