-->
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.  [ 3 posts ] 
Author Message
 Post subject: joined-subclass with composite-id issue
PostPosted: Tue Aug 16, 2005 11:32 am 
Newbie

Joined: Wed Feb 04, 2004 2:33 pm
Posts: 10
I think I may have found an issue with SessionFactoryImpl in the situation where you have a class with a composite-id with a key-many-to-one AND also a joined-subclass element

The problem appears to manifest itself if the mappings are read in the wrong order (which does not seem to be deterministic if using the load from assembly method)

The problem is this -- when the "PersisterFactory.Create( model, this )" call happens (see code below), if the model happens to be a class with a joined-subclass, it uses the NormalizedEntityPersister, which then processes a key-many-to-one to a class mapping which has not been processed yet and I get a "No persister found" error. (well, sometimes I get the error, sometimes everything works fine. It just depends if the dependent entity in that key-many-to-one has been processed before the key-many-to-one is executed)


Code:
In SessionFactaryImpl constructor:
...
foreach( PersistentClass model in cfg.ClassMappings )
{
System.Type persisterClass = model.ClassPersisterClass; // not used !?!
IClassPersister cp;
cp = PersisterFactory.Create( model, this );  <== I think this is the issue
classPersisters[ model.MappedClass ] = cp;

...


Any suggestions for a workaround?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 2:10 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Hi, I have this post bookmarked, I'll look at this in a few days.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 10:48 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Fixed in CVS


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.