-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: NHibernate.MappingException: could not interpret type: bool
PostPosted: Wed Aug 01, 2007 1:01 pm 
Newbie

Joined: Tue Jul 17, 2007 4:04 pm
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: NHibernate.MappingException: could not interpret type: b
PostPosted: Wed Aug 01, 2007 1:24 pm 
Regular
Regular

Joined: Fri Jan 27, 2006 2:32 pm
Posts: 102
Location: California, USA
Try "Boolean"


Top
 Profile  
 
 Post subject: Re: NHibernate.MappingException: could not interpret type: b
PostPosted: Wed Aug 01, 2007 3:51 pm 
Newbie

Joined: Tue Jul 17, 2007 4:04 pm
Posts: 3
pelton wrote:
Try "Boolean"


good lord. apologies for the idiotic question. yes, that worked. thansk : )


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 01, 2007 3:53 pm 
Regular
Regular

Joined: Fri Jan 27, 2006 2:32 pm
Posts: 102
Location: California, USA
We've all been there =)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.