Uses heuristics to deduce a NHibernate type given a string naming the type.

Namespace: NHibernate.Type
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public static IType HeuristicType(
	string typeName
)
Visual Basic
Public Shared Function HeuristicType ( _
	typeName As String _
) As IType
Visual C++
public:
static IType^ HeuristicType(
	String^ typeName
)

Parameters

typeName
Type: System..::..String

[Missing <param name="typeName"/> documentation for "M:NHibernate.Type.TypeFactory.HeuristicType(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)

See Also