hibernate search and projection - different fields on different objects
Posted
by Odelya
on Stack Overflow
See other posts from Stack Overflow
or by Odelya
Published on 2010-06-06T14:53:24Z
Indexed on
2010/06/06
15:02 UTC
Read the original article
Hit count: 244
hibernate
Hi!
I have the following code:
Criteria crit = sess.createCriteria(Product.class);
ProjectionList proList = Projections.projectionList();
proList.add(Projections.property("name"));
proList.add(Projections.property("price"));
crit.setProjection(proList);
But I also have User.class and I would like the name to be restricted on User.class and price from Product class.
How can I restrict different columns on different objects in Hibernate Search?
© Stack Overflow or respective owner