Added ability to specify sub-query by providing relation property.
Added many-to-one sub-query support.