Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
に類似した基準を作成する必要があります
select obj, obj.prop.id from Object1 obj group by obj.prop.id
どうやってするか?
リファレンスの例http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/querycriteria.html#querycriteria-projection
List results = session.createCriteria(Cat.class) .setProjection( Projections.projectionList() .add( Projections.rowCount() ) .add( Projections.avg("weight") ) .add( Projections.max("weight") ) .add( Projections.groupProperty("color") ) ) .list();