Quote:
Foreign key (PRNRBASISMODELL_LAND [ID_PRNR_BASISMODELL])) must have same number of columns as the referenced primary key (PRNR_BASISMODELL [BASISMODELL_ID,ID_LAND])
Please, check SQL scripts where you creates primary key for PRNR_BASISMODELL table, as I understand it is composite [BASISMODELL_ID,ID_LAND], but you tries to reference it using only ID_PRNR_BASISMODELL. Is it correct?
If your SQL script is correct, I guess, the problem is in the following mapping:
Code:
<class name="de.XXX.asr.businessmodel.PrNrBasismodellLand" table="PRNRBASISMODELL_LAND">
...
<many-to-one name="prNrBasismodell" column="ID_PRNR_BASISMODELL" class="de.XXX.asr.businessmodel.PrNrBasismodell"/>
try this
Code:
<class name="de.XXX.asr.businessmodel.PrNrBasismodellLand" table="PRNRBASISMODELL_LAND">
...
<many-to-one name="prNrBasismodell" column="ID_PRNR_BASISMODELL" class="de.XXX.asr.businessmodel.PrNrBasismodell" property-ref="corresponding-property-of-PrNrBasismodell-class"/>
And if it is possible, don't use natural (composite) primary keys for your business entities.