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
|