-->
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.  [ 2 posts ] 
Author Message
 Post subject: NamingStrategy in hibernate.cfg.xml
PostPosted: Thu Feb 14, 2008 2:21 pm 
Newbie

Joined: Mon Jun 04, 2007 5:38 am
Posts: 6
Location: UK
Hi,

I'm using Hibernate version 3.2. Can anyone tell me how I can set the naming strategy used by hibernate from within the hibernate.cfg.xml file, please? I'm looking to do the same as the following:
Code:
Configuration.setNamingStrategy(ImprovedNamingStrategy.INSTANCE)

in the hibernate XML configuration file.

Thanks,

Peeper.


Top
 Profile  
 
 Post subject: Re: NamingStrategy in hibernate.cfg.xml
PostPosted: Thu Feb 14, 2008 3:33 pm 
Senior
Senior

Joined: Fri Jun 01, 2007 12:41 pm
Posts: 121
peeper wrote:
Hi,

I'm using Hibernate version 3.2. Can anyone tell me how I can set the naming strategy used by hibernate from within the hibernate.cfg.xml file, please? I'm looking to do the same as the following:
Code:
Configuration.setNamingStrategy(ImprovedNamingStrategy.INSTANCE)

in the hibernate XML configuration file.

Thanks,

Peeper.


You can set the properties given Environment.java class only in hibernate.properties or hibernate.cfg.xml. Rest of the properties like NamingStrategy has to be configured with Configuration class.

http://www.hibernate.org/hib_docs/v3/api/org/hibernate/cfg/Environment.html

http://www.hibernate.org/hib_docs/reference/en/html/session-configuration.html#configuration-namingstrategy

http://forum.hibernate.org/viewtopic.php?t=983708&highlight=


Thanks


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