Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0.5
Mapping documents:
<hibernate-mapping package="kls.domain.entity.solo">
<class name="SoloNote" table="s_notes" discriminator-value="">
<id name="id" column="solon_nu">
<generator class="identity"/>
</id>
<discriminator column="solon_source"/>
<property name="code" column="solon_type"/>
<property name="note" column="solon_text"/>
<property name="creationDate" column="solon_date"/>
<subclass name="SoloHawbNote" discriminator-value="HAWB">
<property name="username" access="field" column="solon_createdby"/>
<many-to-one name="hawb" class="SoloHawb" column="solon_sourcenu"/>
</subclass>
<subclass name="SoloMawbNote" discriminator-value="MAWB">
<property name="username" access="field" column="solon_createdby"/>
<many-to-one name="mawb" class="SoloMawb" column="solon_sourcenu"/>
</subclass>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
HSQLDB 1.8.0.2
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
When using SchemaExport to generate DDL
I end up with two constraints:
alter table s_notes add constraint FK6BCB4FF5CAE77A82 foreign key (solon_sourcenu) references s_mawb
alter table s_notes add constraint FK6BCB4FF5CAE534A7 foreign key (solon_sourcenu) references s_hawb
These make it impossible to insert notes
What am I doing wrong?