-->
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.  [ 1 post ] 
Author Message
 Post subject: lazy="no-proxy" with not-found="ignore" : issue
PostPosted: Fri Aug 13, 2010 3:26 am 
Newbie

Joined: Tue Aug 03, 2010 2:06 pm
Posts: 5
Hi,

Scenario:
---------
I have a polymorphic many-to-one which needs to be lazily loaded. I use lazy="no-proxy" with bytecode instrumentation. The target entity in the association can be null. So i use the attribute not-found="ignore" to avoid throwing exception at run time.

Issue:
------
Hibernate still throws org.hibernate.UnresolvableObjectException: No row with the given identifier exists:

Observed that not-found="ignore" is not working properly if lazy="no-proxy" is used (its not even considered i guess). Also, exception occur only if there are more than one record associated with the null target entity.

Eg : Employee -> Company (Many employees associated to one Company which is null)

I cant do much about the data/existing framework since its a migration project. Can anyone help me out?

Thanks and Regards,
JiVi


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.