Using following mapping in an entity class
@Columns(columns = { @Column(name = "START_DATE"), @Column(name = "START_DATE_TZ") }
) @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTimeAndZone") public DateTime getStartDate() { return startDate; }
query:
select e from MyEntity where :now >= cast(e.startDate as date) ...
causes
org.hibernate.QueryException: Expression to CAST cannot be a composite : ...
|