-->
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.  [ 2 posts ] 
Author Message
 Post subject: middlegen : how-to : separate tables in 2 packages ?
PostPosted: Thu Feb 24, 2005 8:00 am 
Newbie

Joined: Tue Feb 22, 2005 5:27 am
Posts: 10
Hibernate version: 2.1.8

Hi,

I would like to know if it's possible to separate my tables in two java packages
I tryed to put 2 <middlegen> tags in my middlegen-build.xml file :
Note the package=attribute
Code:
<middlegen appname="BOMC" ...>
         
<hibernate
            destination="${dest.dir}"
            package="${package1}"
           ...
/>
   
<table name="TABA" />
</middlegen>

<middlegen appname="BOMC" ... >
         <hibernate
            destination="${dest.dir}"
            package="${package2}"
           ...
    />
   
    <table name="TABB" />
...
</middlegen>


and it work pretty well BUT I don't get the relations created between TABA and TABB.
Well you'll probably ask me why I want to put those tables in differents package if they have relations, but it's because I have 80 tables with relations but don't want to get 80 files in the same package...

I tryed also to create 2 middlegen-build.xml but same pb.

I'm ok to do the work by hand (ie putting the relation between the 2 tables in the hbn.xml file) but when I'd like to add a table, the middlegen will erase my change, would'nt it ??

If somebody shared the same experience, I'd appreciate
Regards,

Philippe


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 24, 2005 6:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You have found the appropriate solutions. There is no direct support for it (while getting relationship across the boundaries). I would suggest you send a reminding of this for Hibernate 3.x tools since the primary focus is now in this work area.
[Note: If you do create a reasonable patch for Middlegen I will consider it]


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