-->
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: Criticle relationship feature missing
PostPosted: Mon Jun 21, 2004 4:51 pm 
Newbie

Joined: Wed May 19, 2004 7:39 pm
Posts: 16
Location: Canton, GA
From my previous post, there doesn't appear to be a way to map Many-to-One without using primary keys. I have GUIDs that I need to map in a relationship structure, but they are not my primary keys.

Can someone please at least confirm if this is doable or not? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2004 4:54 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
can you at least explain db structure please?

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject: Structure
PostPosted: Mon Jun 21, 2004 5:30 pm 
Newbie

Joined: Wed May 19, 2004 7:39 pm
Posts: 16
Location: Canton, GA
The structure is very straight forward. I have an object called Package that contains a collection of PackageFile objects. Both of those objects have an id (Long) and a guid (String).

Those objects map to package and package_file tables. There is an FK in package_file to package on a column named package_guid.

I want to have a hibernate mapped collection where I can call getFiles() that will return a collection of PackageFile objects based on the Package.guid = PackageFile.package_guid relationship.

I can post some code / mapping file if you need them, but that's pretty much it. Many-to-one has a <key> tag to specify the column to use in the foreign table when you do not want to use the primary key. However there doesn't seem to be a way in hibernate to specify a non-primary key column to use in the parent table.

Am I missing something here?


Top
 Profile  
 
 Post subject: End of Hibernate
PostPosted: Tue Jun 22, 2004 12:30 pm 
Newbie

Joined: Wed May 19, 2004 7:39 pm
Posts: 16
Location: Canton, GA
My appologies to all about how I'm using the forums.

Overall Hibernate is pretty cool, but I think we're a special use case where we send related data across a web service using Hibernate at both ends. It just seems that Hibernate is not suited to this situation. So switching to another ORM like JDO might our best option.

I know the forums are free and developers like me are spending time helping when they can. Thanks to everyone that has helped in the past...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2004 12:34 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Good bye.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.