java - hibernate projection unique list -



java - hibernate projection unique list -

i'm trying utilize hibernate , projection result list doesn't have duplicated element.

i have class currentityprofilebo, has property entityid.

criteria criteria = session.createcriteria( currentityprofilebo.class, "entityprofilebo"); criteria.setprojection(projections.distinct(projections .projectionlist().add(projections.property("entityid"))));

i'm getting exception:

[2014-11-04 11:28:59] error [http-8080-5] (sqlexceptionhelper.java:144) - ora-01791: not selected look [2014-11-04 11:28:59] warn [http-8080-5] (abstracthandlerexceptionresolver.java:185) - handler execution resulted in exception org.hibernate.exception.sqlgrammarexception: ora-01791: not selected look @ org.hibernate.exception.internal.sqlexceptiontypedelegate.convert(sqlexceptiontypedelegate.java:82)

appreciated helps!

according sp00m. criteria.setresulttransformer(criteriaspecification.distinct_root_entity); works well!

java hibernate criteria

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -