-->
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.  [ 4 posts ] 
Author Message
 Post subject: Global prefix for generated table names
PostPosted: Tue Jan 10, 2006 7:05 am 
Newbie

Joined: Fri Dec 09, 2005 6:17 am
Posts: 7
I'm just configured my session factory to use a custom naming strategy that adds a prefix to each table name it looks for. This works great.

I'd now like to be able to use hbm2ddl to generate the tables with the same prefix. I've checked the usual sources, google / forum but can't find an example, how do I do it?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 7:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
set namingstrategy="yourClass" on <configuration> when using tools.hibernate.org

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 1:41 pm 
Newbie

Joined: Fri Jan 06, 2006 5:06 am
Posts: 3
Can I do the opposite? i.e..I'm trying to generate POJO's from schema. All tables are prefixed with 'tbl'. I dont want tbl to appear as part of class name.

eg. I want tblEmployee generated as Employee.java

cheers
suds.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 1:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
that is reverseengineering strategy in the tools. see the docs.

_________________
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.  [ 4 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.