-->
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: Question about Middlegen R5
PostPosted: Fri Jul 23, 2004 10:00 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
I'm using Middlegen R2 at the moment.

I've downloaded R5 to give it a test drive.
I generated my mapping files and already saw a diference.

For a class with a composite-id, if a component of that key maps to another class, it's generated with <key-property> rather than <key-many-to-one>!

Is there areason for this?


Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 23, 2004 1:47 pm 
Beginner
Beginner

Joined: Thu Jun 24, 2004 1:04 pm
Posts: 35
Location: Minnesota - USA
Read the change log. I believe that is now the default style in R5. There may be new configuration options to get it to generate in the pre-R5 style, but I don't know what they are.

I'm actually glad of the change, I find the PK classes hbm2java creates from <key-many-to-one> to be exeedingly difficult to work with. We're using legacy tables that have very deep composite business keys.
Code:
E.comp_id.D.comp_id.C.comp_id.B.comp_id.A.aKeyProperty
Yuck! ;)

--gus


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 23, 2004 9:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Two reasons for the change:
1) I'm able to map many more possible composite key configurations
2) I have a preference for it :-) [It is the recommended approach].

Having said that you just need to de-select the option in the GUI (or in the ant script) and it will behave as R2->R4 did).


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.