Hi,
So I hoped my mappings would be complete, but as usual there are problems :D
My application would be used to create invoices, which means the address or any other information of a client may not change.
Now, I though when retrieving information of a class other then that of the mapping file, you should add a component tag ex:
Code:
<component name="Client" class="Client" access="nosetter.pascalcase-underscore">
<property name="Name" not-null ="true"></property>
<property name="Tva" not-null ="true"></property>
</component>
But invoices are also related to a client, which means you need to have a "many-to-one"-tag of Client. That makes its so I have to names "Clients"
Code:
<component name="Client" class="Client" access="nosetter.pascalcase-underscore">
<property name="Name" not-null ="true"></property>
<property name="Tva" not-null ="true"></property>
</component>
<many-to-one name ="Client" not-null ="true" class="Client" column="ClientID" cascade="save-update"> </many-to-one>
This off course doesn't work, but how would I be able to resolve this?