-->
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: How to set a generic sequence name to all tables ?
PostPosted: Thu Apr 03, 2008 11:04 am 
Newbie

Joined: Thu Apr 03, 2008 9:19 am
Posts: 4
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2

Name and version of the database you are using: Oracle 10g

Hi,

I have created one sequence per table, with a generic name "seq_TABLE_NAME".

I know it is possible to set the sequence name for each table via a reveng.xml file. The problem is that i have almost 60 tables.

Is there a way to specify a generic sequence name for all tables, instead of specifying the sequence name for each of my 60 tables via the reveng.xml file ?

Thank you.
Nicolas.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 6:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use a custom reverseengineeringstraetgy impl and implement getTableIdentifierProperties(TableIdentifier) to return the properties you want....

you might also need to implement getTableIdentifierStrategyName(TableIdentier) { return "sequence"; } or whatever strategy you want to use.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 9:29 am 
Newbie

Joined: Thu Apr 03, 2008 9:19 am
Posts: 4
Hi,

thank you for your answer it works well !

Nicolas.


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.