Advertisement
yony258

Untitled

Dec 7th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. super.sessionFactory.getCurrentSession().createQuery(
  2. "select * from Appointment as appointment" +
  3. "where appointmentId in" +
  4. "(select appointment.appointmentId, MAX(timeSlot.startDate)" +
  5. "from Appointment as appointment" +
  6. "inner join TimeSlot as timeSlot" +
  7. "where appointment.patient = :patient)"
  8. ).setParameter("patient", patient).uniqueResult();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement