here is the generated sql sorry about the code tag
Code:
2006-01-10 10:59:31,453 WARN [RMI TCP Connection(4)-127.0.0.1] (ErrorCounter.java:46) - *** WARNING: Keyword 'order' is being intepreted as an identifier due to: expecting IDENT, found 'order'
Hibernate: select scorecard0_.SCORECARD_ID as SCORECARD1_, scorecard0_.SCORECARD_VERSION as SCORECARD2_, scorecard0_.SCORECARD_LAST_UPDATE as SCORECARD3_19_, scorecard0_.SCORECARD_NAME as SCORECARD4_19_, scorecard0_.SCORECARD_DESCRIPTION as SCORECARD5_19_, scorecard0_.SCORECARD_ORDER as SCORECARD6_19_, scorecard0_.SCORECARD_START_DATE as SCORECARD7_19_, scorecard0_.SCORECARD_END_DATE as SCORECARD8_19_, scorecard0_.COMMENT_ID as COMMENT9_19_ from SCORECARD scorecard0_ inner join SCORECARD_CHILDREN parents1_ on scorecard0_.SCORECARD_ID=parents1_.CHILD_SCORECARD_ID and scorecard0_.SCORECARD_VERSION=parents1_.CHILD_SCORECARD_VERSION inner join SCORECARD scorecard2_ on parents1_.PARENT_SCORECARD_ID=scorecard2_.SCORECARD_ID and parents1_.PARENT_SCORECARD_VERSION=scorecard2_.SCORECARD_VERSION where scorecard2_.SCORECARD_ID=? and (? between scorecard0_.SCORECARD_START_DATE and scorecard0_.SCORECARD_END_DATE) order by scorecard0_.SCORECARD_ORDER