#1332
[Hibernate] Native Query with date result
In the DAO/Repository class :
String sql = "SELECT sysdate as SYS_DATE from dual";
Query query = getEntityManager().createNativeQuery(sql, "SysdateMapping");
return (Date) query.getSingleResult();
On an entity class :
@SqlResultSetMapping(name = "SysdateMapping", columns = @ColumnResult(name = "SYS_DATE", type = Date.class))
The Difference Between ROW_NUMBER(), RANK(), and DENSE_RANK() Windows : Mapping drive letters to local folders