Hi,
Can you tell me why this HQL is wrong :
Code:
<query name="FluxDao.getLast">
select f from Flux f where f.id = (select max(f.id) from f where f.courrier.nodeRefId=:courrier_nid)
</query>
And the calling method :
Code:
HibernateCallback getLastCallback = new HibernateCallback() {
public Object doInHibernate(Session session) {
Query query = session.getNamedQuery( "FluxDao.getLast" );
query.setString( "courrier_nid", pNodeRefId );
return query.uniqueResult();
}
};
Flux lFlux = (Flux) ht.execute( getLastCallback );
Help me please for the syntax error.