The mapping file generated by FNH is:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="MyApplication.Model, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null" namespace="MyApplication.Model">
<class name="Comment" table="Comment" xmlns="urn:nhibernate-
mapping-2.2">
<id name="ID" type="Int64" column="">
<generator class="identity" />
</id>
<discriminator column="IsOfficial" type="Boolean" />
<property name="Body">
<column name="Body" not-null="true" length="10000" />
</property>
<property name="CreatedAt">
<column name="CreatedAt" not-null="true" />
</property>
<subclass name="MyApplication.Model.UserComment,
MyApplication.Model, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null" discriminator-value="False" />
<subclass name="MyApplication.Model.OfficialComment,
MyApplication.Model, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null" discriminator-value="True" />
</class>
</hibernate-mapping>
As Hudson said, the only real difference I see between that and what
you've got is the capitalization of the value discriminator-value
attribute. However, I thought that System.Boolean.Parse(String value)
was case-insensitive.
Thoughts?
-steve
On Apr 15, 2:35 pm, Tuna Toksoz <
tehl...@gmail.com> wrote:
> I think this mapping worked fine
>
> <class
> name="NHibernate.Test.TypesTest.BooleanClass, NHibernate.Test"
> table="bc_bool"
> discriminator-value="false"
> >
>
> <id name="Id" column="id">
> <generator class="assigned" />
> </id>
> <discriminator column="Osman"
> type="Boolean" />
>
> <property name="BooleanValue"
> type="Boolean"
> column="boolc"/>
>
> <subclass name="NHibernate.Test.TypesTest.BooleanClass2,
> NHibernate.Test"
> discriminator-value="true">
> </subclass>
>
> </class>
>
> but don't know what the fnh produced. it may have to do with the default
> values you provided (true, false). Do you know what it produces as output?
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
>
http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
> On Wed, Apr 15, 2009 at 9:02 PM, Steven Harman <
stevehar...@gmail.com>wrote:
>
>
>
> > Tuna, thanks for the quick replies... but I'm not sure I understand
> > your last post. Are you saying you think this might be a NHibernate
> > issue with parsing bit fields for bools?
>
> > Thanks,
> > -steve
>
> > On Apr 15, 1:36 pm, Tuna Toksoz <
tehl...@gmail.com> wrote:
> > > Ups wait, bool type asks for "true" "false" kind of thing. I wil lfind.
>
> > > Tuna Toksöz
> > > Eternal sunshine of the open source mind.
>
> >
http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitt...