sysdate « Oracle « JPA Q&A

1. substract n minutes to sysdate (Oracle, HQL hibernate 2)

Hi, Here is HQL I use for adding days: "select * from Person pers where (pers.birth> trunc(sysdate - :daysoffset))" - Persons with birth date after "daysoffset" days from now. but the birth field is full date with minutes and seconds. I want: Persons with birth date after "daysoffset" MINUTES from now. Thanks,

2. [Oracle 9i] [Hibernate 3.0] sysdate.

String hql = "select sysdate() from Category"; // "sysdate()" is correct, but "sysdate" not. Query q = session.createQuery(hql); List result = q.list(); ...

3. Problems with Oracle's SYSDATE and SYSTIMESTAMP

Hi I'm trying to get the sysdate or systimestamp from an Oracle database. If I use sysdate Hibernate is not retrieving the hour, minute, second part. I always get 12:00:00pm If I use systimestamp I get the following exception: org.hibernate.MappingException: No Dialect mapping for JDBC type: -101 at org.hibernate.dialect.TypeNames.get( at org.hibernate.dialect.TypeNames.get( at org.hibernate.dialect.Dialect.getHibernateTypeName( at org.hibernate.loader.custom.CustomLoader.getHibernateType( at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes( at org.hibernate.loader.Loader.getResultSet( at org.hibernate.loader.Loader.doQuery( ...