-->
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.  [ 6 posts ] 
Author Message
 Post subject: Package level Generator
PostPosted: Tue Jan 24, 2006 5:30 pm 
Newbie

Joined: Sat Sep 03, 2005 1:04 pm
Posts: 12
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

I can understand if the SchemaExport can create sequences definited at package level with the @SequenceGenerator annotation...

Lunching the tool seams that it doesn't work.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 3:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I don't understand the question.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 4:21 am 
Newbie

Joined: Sat Sep 03, 2005 1:04 pm
Posts: 12
max wrote:
I don't understand the question.


As EJB3 specification say, is possibile to define SequenceGenerator at pakege level... see the Hiberante Annotation Dicumentation 2.2 "Mapping Identifier Properties"... Hibernate Core 3.1.1 support this and at runtime it uses the right sequences to insert new rows.

On contrary The Hibernate Tools 3.1.0 beta2 seams ingore that kind of sequences during the Schema Generation... and so we haven't any sequance in the database...

Just nothing this, I know Hibernate Tools 3.1.0 beta2 is still a BETA version.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 4:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so you are talking about schemaexport ?
Have you added the package level information to the cfg.xml so it can be used when schemaexporting ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 4:45 am 
Newbie

Joined: Sat Sep 03, 2005 1:04 pm
Posts: 12
max wrote:
so you are talking about schemaexport ?
Have you added the package level information to the cfg.xml so it can be used when schemaexporting ?


yes I have put a this line

<mapping package="com.panks"/>

And in that package I have this file

@SequenceGenerator(
name="SEQ_GEN",
sequenceName="global_sequence"
)
package com.panks;

import javax.persistence.SequenceGenerator;


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 4:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so report it with a failing testcase against schemaexport in the jira.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.