Criteria hibernate
        Posted  
        
            by apb
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by apb
        
        
        
        Published on 2010-06-08T11:31:33Z
        Indexed on 
            2010/06/08
            11:42 UTC
        
        
        Read the original article
        Hit count: 344
        
hibernate
my code
session.createCriteria(Input.class);
      DateFormat format = 
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
      Date startDate = 
(Date)format.parse("2005-01-01 00:00:00");
      Date endDate = 
(Date)format.parse("2005-03-03 00:00:00");
      crit.add(Expression.between
("inputDate", new Date(startDate.getTime()),
 new Date(endDate.getTime()))); 
This code return a list, but there is no element present in it. i think it doesn't match the condition. Anybody help.
© Stack Overflow or respective owner