-->
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.  [ 3 posts ] 
Author Message
 Post subject: Ant with Hibernate
PostPosted: Mon Oct 20, 2003 12:27 pm 
Newbie

Joined: Mon Oct 20, 2003 12:18 pm
Posts: 12
Location: Mexico
I want to create my xml files with Ant but I have some problems with one table in oracle, because I have a sequence value.
Im using the next tags:
* @hibernate.id column="id_asociacion_facultad"
* generator-class="sequence"
* generator-parameter-1="segu_asociacion_facultad_seq"
* unsaved-value="null"
but when I try to verify my code with Hiberna8 I receive the next messagge: Attribute "name" is required and must be specified for element type "param".
I reviewed on Internet and I found the correct form to use sequence:
<id name="id" type="long" column="uid">
<generator class="sequence">
<param name="sequence">uid_sequence</param>
</generator>
</id>

but my file was generate with this:
<id name="id" column="id_asociacion_facultad" type="long" unsaved-value="null">
<generator class="sequence">
<param>segu_asociacion_facultad_seq</param>
</generator>
</id>

Please If someone can help me.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 20, 2003 5:10 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
try
Code:
@hibernate.id column="id_asociacion_facultad" unsaved-value="null" generator-class="sequence"
@hibernate.generator-param name="sequence" value="segu_asociacion_facultad_seq"

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 20, 2003 5:50 pm 
Newbie

Joined: Mon Oct 20, 2003 12:18 pm
Posts: 12
Location: Mexico
Many thanks, effectively that was the solution.


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

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.