Name and version of the database you are using:
PostgreSQL 8.2
Hi,
I've got something like this:
I have configured the mapping-files and the java-classes so that a unidirectional Set-based association works, i.e. can get a "Form" this way:
Code:
User user = (User) session.load(User.class, UserId);
Set result = user.getForm();
What I would like to do is browsing the result, by using the database instead of doing it manually.
Basically I need something like this:
Code:
Select * from Form
join User_Form on User_Form.Form_ID=Form.Form_ID
join User on User.User_ID=User_Form.User_ID
where User.User_ID=?
LIMIT ? OFFSET ?
I know how to do it when using createCriteria or createQuery with setMaxResults and setFirstResult. But how does it work on a Set-based association? Is it even possible?