-->
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.  [ 5 posts ] 
Author Message
 Post subject: Problems with NamingStrategy API
PostPosted: Fri Apr 22, 2011 4:42 pm 
Newbie

Joined: Wed Feb 23, 2011 9:25 pm
Posts: 12
I have some code that looks like

Code:
   class NamingStrategy implements org.hibernate.cfg.NamingStrategy
   {
      public String classToTableName(String className)
      {
         getLogger().debug("className = " + className);

The problem is, the className that gets passed to me is not fully qualified with the package the class is in, and I need that information.

According to http://java.dzone.com/articles/naming-strategy-hibernate?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+javalobby%2Ffrontpage+%28Javalobby+%2F+Java+Zone%29 the example code seems to imply that className should be fully qualified.

For my application I need to know the fully qualified className. Is there any other way to get it at this point during the mapping? Is this a bug in the Postgres provider I am using, is this some other problem, or is this really the way it is supposed to work?

Cheers, Eric


Top
 Profile  
 
 Post subject: Re: Problems with NamingStrategy API
PostPosted: Sat Apr 23, 2011 12:49 am 
Newbie

Joined: Fri Apr 22, 2011 10:16 am
Posts: 6
Hi that sample is working for me correctly i can able to get full qualified class name.


Top
 Profile  
 
 Post subject: Re: Problems with NamingStrategy API
PostPosted: Sat Apr 23, 2011 12:59 am 
Newbie

Joined: Wed Feb 23, 2011 9:25 pm
Posts: 12
Which DBMS are you using?

I'm using PostgreSQL.

Cheers, Eric


Top
 Profile  
 
 Post subject: Re: Problems with NamingStrategy API
PostPosted: Sat Apr 23, 2011 3:45 am 
Newbie

Joined: Fri Apr 22, 2011 10:16 am
Posts: 6
oracle 10g


Top
 Profile  
 
 Post subject: Re: Problems with NamingStrategy API
PostPosted: Sat Apr 23, 2011 11:57 am 
Newbie

Joined: Wed Feb 23, 2011 9:25 pm
Posts: 12
Does anyone know where I would look next to find out why this does not work properly with PostgreSQL?

Cheers, Eric


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