-->
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: Is <many-to-one outer-join="true"> really an
PostPosted: Tue Apr 19, 2005 7:54 pm 
Newbie

Joined: Thu Apr 29, 2004 6:57 pm
Posts: 4
I have a many-to-one relationship where the table on the "many" side may contain a foreign key to a non-existent row on the "one" side table. When accessing this, I get the error "No row with the given identifier exists".

I have added the outer-join="true" attribute and get the same error. Looking in the log, I see that a select was executed on the "many" table with an outer join on the "one" table. However, this is immediately followed by a select on the "one" table for the foreign key which if missing returns zero rows and causes the above error.

Is there a way to use the <many-to-one> mapping to allow the foreign key to optionally point to a missing row?

Hib 2.1.7
MySQL 4.1.10

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 3:03 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
I have a many-to-one relationship where the table on the "many" side may contain a foreign key to a non-existent row on the "one" side table. When accessing this, I get the error "No row with the given identifier exists".


you may have a problem with your data, hibernate may have retrieve an "id" that doesn't exist in one table, this is not related to outer-join.

[/quote]

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


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.