Q:

QueryOver to select an entity

I have a question. I have this query:
 var query = QueryOver.Of<Item>()
                .JoinQueryOver<ItemRelation>(p => p.ItemRelation)
                .Where(r => r.Item1.Id == itemId)

How can I return only Item entity but not Item Relation?
Thanks

A:

The query actually should only return Predmet ... The RelacijaPredmeta is a property of it. If you don't want to load it, use lazy loading, or select the properties of Predmet individually.

