Hi,
I have the following criteria :
Code:
List list = hibernateSession.createCriteria(A.class)
.createAlias("pojo2","e")
.setProjection( Projections.projectionList()
.add( Projections.property("e.col1").as("Description") )
.add( Projections.property("this.cola").as("Comments") )
)
.add( Property.forName("e.col2").eq( anId ) )
.addOrder( Order.asc("e.col3") )
.setCacheable(true)
.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)
.list();
What will be the syntax if I use an entityManager.createQuery() ?
I mean, how to convert the above if I want to use entityManager ?
Thanks for any help/suggestions/pointers.