Uses heuristics to deduce a NHibernate type given a string naming the
type.
Namespace:
NHibernate.TypeAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Shared Function HeuristicType ( _ typeName As String _ ) As IType |
C# |
---|
public static IType HeuristicType( string typeName ) |
Visual C++ |
---|
public: static IType^ HeuristicType( String^ typeName ) |
JavaScript |
---|
NHibernate.Type.TypeFactory.heuristicType = function(typeName); |
Parameters
- typeName
- Type: System..::.String
Return Value
An instance of NHibernate.Type.IType
Remarks
When looking for the NHibernate type it will look in the cache of the Basic types first.
If it doesn't find it in the cache then it uses the typeName to get a reference to the
Class (Type in .NET). Once we get the reference to the .NET class we check to see if it
implements IType, ICompositeUserType, IUserType, ILifecycle (Association), or
IPersistentEnum. If none of those are implemented then we will serialize the Type to the
database using NHibernate.Type.SerializableType(typeName)