Added support for querying one to one relationship ids. Fixes #7.