Joined: Thu Jan 27, 2005 4:24 pm Posts: 2
|
Hi All,
I've been driving myself crazy trying to get a one-to-one bi-directional association working but cannot get hbm2ddl to generate. After going through all sorts of hoops to do with incorrect column numbers I have become stuck with the following error when running hbm2ddl:
"Schema text failed: Could not determine type for column ContractNumber of type org.hibernate.type.SerializableType: java.lang.ArrayIndexOutOfBoundsException"
The two mapping files are:
<hibernate-mapping>
<class
name="domain.Contract"
table="ContractHeader">
<composite-id name="pk" class="domain.PkContract">
<key-property
name="branchNumber"
type="short"
column="BranchNumber" />
<key-property
name="contractNumber"
type="integer"
column="ContractNumber" />
</composite-id>
<one-to-one
name="entryContract"
class="domain.EntryContract" />
<!-- other properties removed -->
</class>
</hibernate-mapping>
<hibernate-mapping>
<class
name="domain.EntryContract"
table="EntryContractHeader">
<id name="pk" type="domain.PkContract">
<column name="BranchNumber" />
<column name="ContractNumber" />
<generator class="foreign">
<param name="property">contract</param>
</generator>
</id>
<one-to-one
name="contract"
class="domain.Contract"
constrained="true"
/>
<!-- other properties removed -->
</class>
</hibernate-mapping>
I'd really appreciate any help I could get on this one.
Thanks
Mike
|
|