I'm currently using Hibernate 3 with POJOS to map thedatabase.This is all the code involved:<query name="unreturned.loans"><![CDATA[ select l.id, b.title, c.surname, c.telephone, c.email from Loan l, Book b, Customer c where c.id = l.card and b.id = l.book and l.returndate >current_timestamp]]></q...