-->
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: schemaupdate
PostPosted: Tue Dec 23, 2003 3:20 pm 
Newbie

Joined: Tue Dec 23, 2003 3:07 pm
Posts: 1
i have created an ant target for schemaupdate which is

<taskdef name="schemaupdate"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask"
classpathref="project.classpath"/>
<schemaupdate
properties="config/hibernate.properties"
quiet="no">
<fileset dir="src">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaupdate>

My hbm file looks like
<hibernate-mapping>
<class name="db.User" table="User">
<id name="id" type="long">
<generator class="seqhilo">
<param name="sequence">user_sequence</param>
<param name="max_lo">1</param>
</generate>
</id>
<property ...................
</class>
</hibernate-mapping>


When I do update hbm file, and run schemaupdate, I get exception. The exception occurs because of the statement "create sequence .." as the sequence already exists. Why schemaupdate generate "create sequence" instead of "update sequence"? How can i control this? Thanks in advance


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.