-->
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: Using middlegen for generating hbm files for table subset
PostPosted: Fri May 07, 2004 5:34 am 
Newbie

Joined: Sun Apr 11, 2004 9:38 am
Posts: 12
Hi,
I wish to use middlegen and the hibernate plugin for generating hbm files for a subset of tables.

I wish to achieve the following:-
- just analyze a subset of tables and generate the prefs file(which I will be modifying)
- just generate the hbm files for a subset of tables.

I don't want to use the table tag with generate="true/false" as I would need to specify each table for which I need to generate the hbm file in that case. Is there any alternative to just specify a subset of tables, for both analysis and hbm file generation????

My ant code is as follows:-

<taskdef
name="middlegen" classname="middlegen.MiddlegenTask"
classpathref="class.path"/>

<middlegen
appname="${refdata.packagename}"
prefsdir="${currentdir}" gui="false"
databaseurl="${database.url}" driver="${database.driver}" username="${database.userid}"
password="${database.password}" schema="${database.schema}">



<!-- Plugins -->
<hibernate
destination="${currentdir}" package="${refdata.packagename}"
javaTypeMapper="middlegen.plugins.hibernate.HibernateJavaTypeMapper"/>
</middlegen>


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 11:10 pm 
Beginner
Beginner

Joined: Tue Feb 10, 2004 2:30 pm
Posts: 25
The project I am on has a similar requirement. We ended up letting Middlegen create hbm files for everything, and then setting a fileset to exclude the pattern types we don't care about, and then running that pattern set via hbm2java.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 08, 2004 12:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Your only option is the Table tag at this point. I may consider allowing a Ant config option to process a subset via a regular expression but at this point I have other priorities.


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.