开发者

QueryOver to select an entity

开发者 https://www.devze.com 2023-01-27 06:06 出处:网络
I have a question. I have this query: var query = QueryOver.Of<Item>() .JoinQueryOver<ItemRelation>(p => p.ItemRelation)

I have a question. I have this query:

 var query = QueryOver.Of<Item>()
                .JoinQueryOver<ItemRelation>(p => p.ItemRelation)
                .Where开发者_Python百科(r => r.Item1.Id == itemId)

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

Thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消