tags:

views:

31

answers:

0

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?