-->
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: Plural vs Singular (again)
PostPosted: Wed Nov 03, 2004 1:35 pm 
Newbie

Joined: Tue Oct 19, 2004 3:22 pm
Posts: 6
Location: Mobile, RV
I just ran into a case where middlegen singularized this table name ref_publication_series. It changed it to RefPublicationSery. I am sorry but this is wrong. I would really like to see an option to allow us to tell middlegen -not- to singularize at all. I would rather look at (harmless) plural objects like "Persons" than deal with the one offs. Just my 2 cents.

Tim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 03, 2004 7:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
This option can be switched off. The code that makes the conversion can be replaced with your own implementation.


Top
 Profile  
 
 Post subject: velocity?
PostPosted: Wed Nov 03, 2004 7:47 pm 
Newbie

Joined: Tue Oct 19, 2004 3:22 pm
Posts: 6
Location: Mobile, RV
Using the velocity templates you mentioned in another chain?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 5:02 pm 
Newbie

Joined: Tue Oct 26, 2004 2:12 am
Posts: 11
david wrote:
This option can be switched off. The code that makes the conversion can be replaced with your own implementation.


Can you elaborate on this at all? Are you referring to the singular and plural properties that one can set in the <table> section of hbm.xml files? Or is there something I missed?

If it is the tweaking of hbm.xml files then I don't think this is an option for us since we are still regenerating these often, and may be doing so for much of the project.

We REALLY want to be able to turn off this singularization feature... I saw some recent arguments for it regarding java beans naming conventions... We aren't using beans or j2ee (we're building a stand-alone app), and I appreciate using a naming convention, but this renaming of every table and column name (see my other post yesterday please) is a real hindrance.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 8:55 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You can add a substitute module that controls the name conversions through the Ant script.


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.