-->
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: can Getters and Setters not use the class name override?
PostPosted: Wed Nov 28, 2007 3:00 pm 
Newbie

Joined: Wed Jan 19, 2005 2:39 pm
Posts: 16
That subject line makes almost no sense... Sorry. Anyway; we've been generating our persistence layer from within eclipse using the hibernate-tools, but we're moving it out to an ant task so we can control the environment a little better.

We have a USR table that is mapped like this to get the object to be 'User'.

Code:
   
<hibernate-reverse-engineering>
...
<table name="USR" class="com.company.User">   
</table>
...
<hibernate-reverse-engineering>


This works great, however...

When we generate in eclipse, we get methods like this:
User getUsrByUsrId()

Outside of eclipse we get this:
User getUserByUsrId()

Note that the second one is using the class we've defined (getUser) in the method name, and the first isn't (getUsr). I like the second one better actually, but all of our code was written using the first style.

So, my question is why might they be different? I tried to use exactly the same jars (and versions) the eclipse reverse engineering uses, but I may have missed something. Or, is there a setting I'm missing?

Any help would be greatly appreciated.

Thanks
M


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 6:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
this is controlled by the reverse engineering strategy and I don't think you are using the same version in eclipse and ant (are you actually using the jar from inside eclipse plugins ?)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 30, 2007 10:36 am 
Newbie

Joined: Wed Jan 19, 2005 2:39 pm
Posts: 16
Yep. Turns out the eclipse platform was indeed using beta7 instead of beta9a, as I had been led to believe. Running the ant version with the beta7 libraries resulted in consistent results. Thanks much.


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.