only use 1 query and do not load all objects to find out if it is a relation
Merge pull request #78 from grosser/avoid-all-query

only use 1 query and do not load all objects to find out if it is a relation