开发者

Collection property and Projections of Criteria API (Hibernate)

I have two entities that relate to each other as "many-to-one". So one type of the entity has a collection of child entities of another type. Is it possible to retrieve that collection property with Projections? I mean smth like

criteria.setProjection( Projections.projectionList() .add( Projections.id() ) .add( Property.forName( "name" ) ) .add( Property.forName( "childEntities" ) ));

where childEntities is a pr开发者_如何学运维operty of the type Set.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜