-->
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.  [ 4 posts ] 
Author Message
 Post subject: Middlegen foreign key as property not reference to object
PostPosted: Thu Mar 04, 2004 5:34 am 
Regular
Regular

Joined: Tue Nov 11, 2003 7:35 pm
Posts: 63
I saw a number of questions on the forum about a similar issue to this but not quite in the same way.

Say I have tables in a parent-child relationship, like Order and LineItem. The LineItem table has a foreign key to Order in a field called ORDER_ID_FK.

In the Middlegen UI, I removed the direction arrow on both ends. In the output I expected a field called orderIdFk to be created that is a <property> with type int, instead of creating the <many-to-one> relationship. However, the resulting output did not have this field included at all.

In other words, I am trying to specify fields that are FKs to simply be mapped as a <property> with type int instead of <many-to-one>. I also only want to do this for specific fields in specific tables, not for all foreign keys in the db. Is it possible to set this up that if a foreign key exists and all arrows are removed in the UI that property tags are generated instead of leaving that field out the resulting generated hbm file completely? I still want to get just the value of the field!

Thanks,
Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 04, 2004 10:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Hmmmm... I will have to try it our but it is not something that I had tested. It needs to be confirmed but it could be a missing feature :-). Put an entry into JIRA under tools and I will have a look at it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2004 12:16 am 
Regular
Regular

Joined: Tue Nov 11, 2003 7:35 pm
Posts: 63
Ok,

I created the issue in the JIRA in http://opensource.atlassian.com/project ... key=HB-788

Thanks,
Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 06, 2004 7:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Thanks I noticed it.


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