Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
2.1.8
Mapping documents:
<class name="StageVO" table="stages" mutable="true" polymorphism="implicit" dynamic-update="false" dynamic-insert="false" batch-size="1" select-before-update="false" optimistic-lock="version">
<meta attribute="extends" inherit="false">AbstractStageVO</meta>
<id unsaved-value="null" column="id" type="java.lang.Integer" name="id">
<generator class="native"/>
</id>
<property name="stageStatus" type="java.lang.Integer" column="stage_status" length="5" not-null="false" unique="false" update="true" insert="true"/>
<many-to-one name="proceduresTemplateStage" class="ProceduresTemplateStageVO" not-null="true" unique="false" outer-join="auto" update="true" insert="true">
<column name="f_procedures_template_stages"/>
</many-to-one>
<many-to-one name="callForTender" class="CallForTendersVO" not-null="true" unique="false" outer-join="auto" update="true" insert="true">
<column name="f_call_for_tenders"/>
</many-to-one>
</class>
Generated DDL:
create table stages (
id integer not null,
stage_status integer,
f_procedures_template_stages integer not null auto_increment,
f_call_for_tenders integer,
primary key (f_procedures_template_stages, f_call_for_tenders)
)TYPE=InnoDB;
Why is hbm2ddl ignoring my id element and creates a compozite key instead?