-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hbm2ddl ignores id element?
PostPosted: Thu Mar 03, 2005 9:33 am 
Beginner
Beginner

Joined: Wed Sep 17, 2003 10:43 am
Posts: 48
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.