-->
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: inherited classes loading
PostPosted: Thu May 26, 2005 4:32 am 
Have inherited classes.

class Base;
class A:Base;
class B:Base;
class C:B;
class D:B;

all classes mapped in one table vary by descriminator.

when load some entity by any Criteria ( CriteriaLoader used ) - all Ok.

but when i try load some entity by Id - have troubles when load
entity A, but provide ID from entity C - expected result is - No records return, but it return record and convert it to A type( Error )


When CriteriaLoader works, it add to Select clause where part:
"AND descriminator_field=descriminator_value "
But with EntityLoader it is not added.

Promlem fixed if replace line:
Code:
return persister.WhereJoinFragment( alias, true, true );

with new one:
Code:
return ( (IQueryable) Persister).QueryWhereFragment( Alias, true, true );


in AbstractEntityLoader file


Top
  
 
 Post subject:
PostPosted: Thu May 26, 2005 3:14 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Thanks, it would be great if you could enter such evident bugs directly into JIRA, by the way ;-)


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.