I've been searching for hours and it's starting to make me feel like Hibernate isn't all it's cracked up to be.
I have two tables, and I need to create one class from these two tables. One of the tables, I only need one field, so I figured I would use a <join> to get that property.
Well the table I'm joining to has two criteria. Match on ID AND user == 'webuser'.
Here is what I have so far:
Code:
<composite-id>
<key-property name="formId" column="form_id"/>
<key-property name="id" column="field_id"/>
</composite-id>
<join table="FIELD_T" inverse="false" optional="false">
<key column="FIELD_ID" update="false" />
<property name="name" column="NAME"/>
</join>
The Join does not have anything in it to filter the user == "webuser", also when I run the app like this, it gives me an error saying there needs to be as many columns as the referenced primary key... which there is no "form_id" in the second table.
Please help.