-->
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: Bug found!
PostPosted: Tue Jun 05, 2007 9:08 am 
Beginner
Beginner

Joined: Tue Mar 27, 2007 4:54 am
Posts: 47
...or at least an annoying, missing exception.

Let's say you have the following entities..

class A : IOne, ITwo
[propsFromIOne]
[propsFromITwo]

class B : A
[concreteProps]

...and these properties are mapped. In pseudo code something like this is done:
[startTrans in ISession]
b=new B()
Commit()
Evict(b)
bCopy = Load<B>(b.Id)
bCopy.SomeLazyLoadedPropertyFromIOneOrTwo

...and the property above is always null.

I sat with this problem many hours scratching my head clean and looked at very low level to see what the **** was going on. After millions of tests it turned out to be a mistake from my side. The properties in IOne and ITwo were not set to virtual that messed the proxy up. However! - no exception whatsoever! As soon as I removed one of the interfaces, a nice exception popped up. More than one interface implemented on a class - no exception if virtual keyword is forgotten.

Finally... Thanks for a great product! This is the first "non productive hours cause of sick product behaviour I've had so far".

I'm using nhibernate 1.2 GA


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 05, 2007 10:35 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Can you produce a small but complete example (NUnit test case, classes, mappings) and open a JIRA issue? The proxy validation code doesn't take any interfaces into account so it should work the same with one or two interfaces.


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.