I have many tables with composite id like this:
table 1
cardNumber
fiscalNumber
grupNumber
table2
cardNumber
fiscalNumber
grupNumber
idTable2
fullname
I want make un PkTable1 with cardNumber,fiscalNumber,grupNumber
and a Class1 like this
Code:
public class Class1{
PkTable1 pk = new PkTable1 ;
public void setPktable(PKTable1 pk){this.pk=pk;}
etc..
I want map this tables like this:
Code:
<class name="class1" table="table1">
<composite-id name="id" class="PkTable1 ">
<key-property name="cardnumber" type="int" column="cardNumber">
....
</composite-id>
<component name="pk" class ="PkTable1 ">
<property name="cardNumer" type="int" column="cardNumber">
.....
</component>
Is it possible ?