pedro wrote:
Was anyone able to figure out why these exceptions("could not interpret type...") occur?
I need to have the assemblies digitially signed, do you really think that could be the cause? I don't know why that would be though...
I've tried using the full assembly name, but it doesn't work either. Any hints available?
I have.
class TypeFactory() have static constructor static TypeFactory()
this constructor collect all supported types in NHibernate.
and in this collection not present Nullable contrib types.
such us
Code:
typeByTypeOfName[ typeof( Byte[ ] ).Name ] = NHibernateUtil.Binary;
typeByTypeOfName[ typeof( Byte[ ] ).AssemblyQualifiedName ] = NHibernateUtil.Binary;
typeByTypeOfName[ typeof( Boolean ).FullName ] = NHibernateUtil.Boolean;
and method Basic have code
Code:
public static IType Basic( string name )
{
string typeName = String.Empty;
// Use the basic name (such as String or String(255)) to get the
// instance of the IType object.
IType returnType = null;
returnType = ( IType ) typeByTypeOfName[ name ];
if( returnType != null )
{
return returnType;
}
and return null (type not found)
Code:
public static IType HueristicType( string typeName )
{
IType type = TypeFactory.Basic( typeName );
return null too
and throw this exception
Code:
type = TypeFactory.HueristicType( typeNode.Value );
if (type==null) throw new MappingException("could not interpret type: " + typeNode.Value );
Maby more elastic impliment dymanicaly type loading with special interface implementation?