-->
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: Nhibernate 2.0 beta 2
PostPosted: Fri Jul 18, 2008 3:57 pm 
Newbie

Joined: Thu Mar 27, 2008 4:54 pm
Posts: 2
I was trying to port our app to Nhibernate 2.0 using the current beta2 and I found that it fails for certain things.

this is the mapping in my class mapping a child class that is actually an interface so I have to use <any> mapping type:
<any name="Original" meta-type="class" id-type="Guid" cascade="all">
<column name="ORIGINAL_CLASS"/>
<column name="ORIGINAL_ID"/>
</any>

-when its trying to put fully qualified class name into the original_class field it needs to get the fully qualified name to put in it so it calls SessionImpl.BestGuessEntityName
-this method ends up returning Oas.ChildObject . Note its just the class name and not the fully assembly qualified name.
- it then calls TypeType.Set. this method gets this string passed into it: "Oas.ChildObject"
public override void Set(IDbCommand cmd, object value, int index)
{
NHibernateUtil.String.Set(cmd, ((System.Type)value).FullName, index);
}
-it fails on the cast but since its not a fully assembly qualified name in the passed in string and it cant cast to a System.Type so I get a casting error. Everything works with nhibernate 1.2 so it looks like something in 2.0 . I havnt given a good working example but I hope this help anyhow so if anyone could shed any light on this I would be grateful.

thanks
scott


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.