Joined: Wed Feb 25, 2009 6:56 pm Posts: 1 Location: Ferrol
|
I have a hbm.xml that have a calendar:
<property name="fec_modificacion" type="calendar" />
and i'd like get all the objects in the year 2008:
i try this:
Query hql = new HqlQuery();
query string =
(from entidad e
where e.fecha > :fechaINI
and e.fecha < :fechaFIN)
fechaINI like 01/01/2008
fechaFIN like 31/12/2008
queryHQL.setCalendar("fechaINI", calendar);
queryHQL.setCalendar("fechaFIN", calendar);
hql.setQuery (query string);
But i think that it's not good solution.
can i compare the year in a property calendar in hql?
any idea?
other solution?
thanks
_________________ Rodrigo
|
|