Here it is Paul,
as you can see the mapping for the field is correct with regards to type and sql-type, but a length field has been applied to it. That is incorrect for a text field in SQL.
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false" assembly="Tubbed.Core" namespace="Tubbed.Core">
<class name="ApplicationLog" table="ApplicationLog" xmlns="urn:nhibernate-mapping-2.2">
<id name="LogEntryID" column="LogEntryID" type="Int32">
<generator class="identity" />
</id>
<property name="Date" column="Date" type="DateTime">
<column name="Date" />
</property>
<property name="Level" column="Level" length="50" type="String">
<column name="Level" />
</property>
<property name="Logger" column="Logger" length="255" type="String">
<column name="Logger" />
</property>
<property name="Message" column="Message" length="100" type="StringClob">
<column name="Message" sql-type="text" />
</property>
<property name="Thread" column="Thread" length="50" type="String">
<column name="Thread" />
</property>
</class>
</hibernate-mapping>
Mapping File:
public class ApplicationLogMap : ClassMap<ApplicationLog>
{
public ApplicationLogMap()
{
WithTable("ApplicationLog");
Id(x => x.LogEntryID);
Map(x => x.Date);
Map(x => x.Level).WithLengthOf(50);
Map(x => x.Logger).WithLengthOf(255);
Map(x => x.Message).CustomTypeIs("StringClob").CustomSqlTypeIs("text");
Map(x => x.Thread).WithLengthOf(50);
}
}
Alec Whittington