Hi,
My DB structure is
ParentTable
id - PK
----
ChildTable (having composite PK)
id pk (same as parent)
lcle-cd pk
---
My mapping
Mapping - PARENT CLASS
<class name="Parent" table="ParentTable" lazy="false" mutable="false">
<id name="id" type="string">
<column name="ID" />
<generator class="assigned"/>
</id>
<bag name="lblList" lazy="false" inverse="true" >
<key column="ID"/> <one-to-many class="CsdI18NObj"/> </bag>
</class>
Mapping - CHILD CLASS
<class name="CsdI18NObj" table="CHILD">
<composite-id> <key-many-to-one name="Id" column="ID"/> <key-many-to-one name="lclCode" column="LCLE_CD"/> </composite-id>
<property name="lbl" column="LBL_TX" type="string"/>
</class>
My Java code
l = hibSession.createQuery("select p.id, p from Parent p left join fetch p.lblList ").list();
My Problem
This is not working and is giving an error
processing one-to-one association property references
[7/5/04 12:50:06:100 IST] f9fbd9 Configuration I net.sf.hibernate.cfg.Configuration processing foreign key constraints
[7/5/04 12:50:06:741 IST] f9fbd9 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.ExceptionInInitializerError
Any help is appreciated.
|