Getting this error on the IsLocked property with the following hbm. Can't believe NHibernate doesn't support a bool type. What am I doing wrong?
thanks
hawkeye parker
Hibernate version:
1.2
Mapping documents:
<?xml version="1.0" encoding="utf-8" ?>
<!-- <!DOCTYPE hibernate-mapping SYSTEM "hibernate-mapping-2.0.dtd"> -->
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Autodesk.Collaboration.Platform.Data.Objects"
assembly="Autodesk.Collaboration.Platform">
<class name="Autodesk.Collaboration.Platform.Data.Objects.File" table="FileInfo" lazy="false">
<id name="Id" column="Id" type="int">
<generator class="Autodesk.Collaboration.Platform.Data.SequenceGenerator, Autodesk.Collaboration.Platform" />
</id>
<property name="DeleteStatus" column="DeleteStatus" type="Autodesk.Collaboration.Platform.Data.DeleteStatus, Autodesk.Collaboration.Platform" not-null="true"/>
<property name="FileName" column="FileName" type="string" not-null="true" />
<many-to-one name="Project" column="ProjectId"
class="Autodesk.Collaboration.Platform.Data.Objects.Project" not-null="true" />
<property name="ParentId" column="ParentId" type="int" not-null="true" />
<property name="IsLocked" column="IsLocked" type="bool" not-null="true" />
<!--This is a computed property with the largest revision available on this file-->
<property name="LatestVersion" type="int" formula="(SELECT MAX(FV.VersionNumber) FROM FileVersion FV WHERE FV.FileId=Id)" not-null="true" />
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
2007/08/01 09:52:00.214 Error SEQ(00000408193946431100) TID(0000000D) BLOCK(Autodesk.Collaboration.Platform.ProjectApi.GetProjectByName) MSG(NHibernate.MappingException: Could not compile the mapping document: Autodesk.Collaboration.Platform.Data.Objects.File.hbm.xml ---> NHibernate.MappingException: could not interpret type: bool
at NHibernate.Cfg.HbmBinder.GetTypeFromXML(XmlNode node)
at NHibernate.Cfg.HbmBinder.BindSimpleValue(XmlNode node, SimpleValue model, Boolean isNullable, String path, Mappings mappings)
at NHibernate.Cfg.HbmBinder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings)
at NHibernate.Cfg.HbmBinder.BindRootClass(XmlNode node, RootClass model, Mappings mappings)
at NHibernate.Cfg.HbmBinder.BindRoot(XmlDocument doc, Mappings mappings)
at NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc, String name)
--- End of inner exception stack trace ---
at NHibernate.Cfg.Configuration.LogAndThrow(MappingException me)
at NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc, String name)
at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name)
at NHibernate.Cfg.Configuration.AddResource(String path, Assembly assembly)
at NHibernate.Cfg.Configuration.AddResources(Assembly assembly, IList resources, Boolean skipOrdering)
at NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly)
at Autodesk.Collaboration.Platform.Data.NHibernateSessionManager.GetSessionFactory(String databaseName) in D:\Develop\Collaboration\Main\Platform\Data\NHibernateSessionManager.cs:line 140
at Autodesk.Collaboration.Platform.Data.NHibernateSessionManager.GetSession(String databaseName, Boolean forceNewSession, IInterceptor interceptor) in D:\Develop\Collaboration\Main\Platform\Data\NHibernateSessionManager.cs:line 190
at Autodesk.Collaboration.Platform.Data.NHibernateSessionManager.GetSession(String databaseName, Boolean forceNewSession) in D:\Develop\Collaboration\Main\Platform\Data\NHibernateSessionManager.cs:line 164
at Autodesk.Collaboration.Platform.Data.DataSession.GetSession() in D:\Develop\Collaboration\Main\Platform\Data\DataSession.cs:line 30
at Autodesk.Collaboration.Platform.Data.LinqContext..ctor() in D:\Develop\Collaboration\Main\Platform\Data\LinqContext.cs:line 36
at Autodesk.Collaboration.Platform.ProjectApi.GetProjectByName(String projectName) in D:\Develop\Collaboration\Main\Platform\ProjectApi.cs:line 122)
Name and version of the database you are using:
MsSql2005 v 9.0.1399
|