Joined: Wed Feb 08, 2006 5:17 am Posts: 3 Location: Finland				
			 | 
			
				
				
					| 
					
						 Hi!
 
 I am trying to accomplish the following using criteria:
 
 select * from A where A.value < (select A.value from A where A.key='specific');
 
 I would prefer to use the Criteria api because the left-hand query is actually much more complicated and already written in criteria.
 
 This is what I have tried but it does not seem to yield any results:
 
 Criteria a = session.createCriteria(A.class).add(Subqueries.propertyLt("value", dc)).list();
 
 where dc = DetachedCriteria.forClass(A.class)
 .add(Restrictions.eq("key",'specific');
 
 
 Anybody? 
					
  
						
					 | 
				 
				 
			 |