-->
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: Issues with Specifying Custom Naming Strategy in Eclipse
PostPosted: Wed Feb 07, 2007 7:56 pm 
Newbie

Joined: Wed Feb 07, 2007 7:30 pm
Posts: 3
Location: Canada
Hibernate version: 3.2.2GA, Annotations 3.2.1GA, Tools 3.2.0.beta9a

Hi all,

I had no problems getting Hibernate Tools up and running and generating mappings from our db. I did however encounter a strange error trying to override the NamingStrategy in Eclipse. I was hoping someone could point out a potential mistake I'm making here or point me in the correct direction.

After creating a Hibernate Console Configuration, I tried to modify it by adding in my customized NamingStrategy (which implements org.hibernate.cfg.NamingStategy). There's an entry for this guy on the first tab of the Console Configuration wizard.

I then added the project that contained the new Naming Strategy to the classpath (and dependency projects as well). This guy had an entry on the second tab of the Console Configuration wizard.

So far -- no errors.

After setting all this stuff up, I tried to run the Hibernate Code Generator. For some reason, it didn't seem to use my NamingStrategy. I then launched the Console Configuration wizard again -- yep, my changes were still there.

So then I tried to reboot Eclipse and run the Hibernate Code Generator again. Once again, my naming strategy was not used. The strange thing here is that when I launched the Console Configuration wizard again, I wasn't able to see my NamingStrategy! Unfortunately, the Error logs didn't have any information I could use.

FYI, here's what .metadata\.plugins\org.hibernate.eclipse.console\hibernate-console.xml-xxx looks like:

<?xml version="1.0" encoding="UTF-8"?>
<hibernate-console>
<configuration configuration-factory="ANNOTATIONS" name="test" project="test" use-project-classpath="true">
<hibernate-config-xml location="/test/config/hibernate.cfg.xml"/>
<classpath>
<path location="/dep1"/>
<path location="/dep2"/>
</classpath>
</configuration>
</hibernate-console>

No naming strategy entries here. Should I add an entry here to force eclipse to use the correct naming strategy? Am I doing something completely incorrect here?

Please let me know if you need any additional info.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 5:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i think i've fixed this in svn. the code for saving the namingstrategy were bad.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 1:01 am 
Newbie

Joined: Wed Feb 07, 2007 7:30 pm
Posts: 3
Location: Canada
Hi Max,

Thanks for you prompt reply. As soon as I got your message, I downloaded the Hibernate source, and built hibernate-tools.jar

from:

http://anonsvn.jboss.org/repos/hibernat ... bernateExt (svnr 11171)

I then popped the guy into the org.hibernate.eclipse_3.2.0.beta9\lib\tools plugin directory in eclipse.

For some reason I ran into the same problem. :(

I suspect I'm doing something wrong here. Am I rebuilding all of the correct modules? Should I grab the plugin sources from CVS and try to build them as well? Maybe create a new Console configuration? Or, do you suggest I just wait for the next beta release?

Thanks for your time again man! :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 3:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
its the ui in the plugins that were messed up about naming strategy.

i have had a commit waiting a few days because i were travelling last week with bad internet connection.....it will hopefully end up in cvs today/tomorrow....i'll try and remember to post here when its in there.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 2:43 pm 
Newbie

Joined: Wed Feb 07, 2007 7:30 pm
Posts: 3
Location: Canada
Sounds cool. Thanks again!


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.