Hi all,
in my application i have the requirement to store word documents in .rtf format in my database. For this purpose i've defined a column of type 'ntext' in my database and mapped the column to a string. In the query analyzer it works fine when i try to store a larger rtf (around 10KB) in the database. Doing the same with NHibernate the rtf is truncated to 4000 bytes (loading works fine). I'm afraid that this is a result from the use of sp_executesql inside NHibernate. Did anyone ran in similar problems and, maybe, have a solution for this?
Regards
Klaus
P.S.: Im using NHibernate 1.0.4 on .NET Framework 1.1
Here is my mapping:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<!-- Created by a MyGeneration Template - Created: 12.09.2007 11:51:57 -->
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" assembly="CallWord" namespace="CallWord">
   <class name="GdmRuleDefinition" table="GDM_RULE_DEFINITION">
      <id name="mId" column="RULE_DEFINITION_ID" access="field" type="Guid">
         <generator class="guid"/>
      </id>
      <property name="Code"                  column="CODE"                   type="String"   not-null="true" length="50" />
      <property name="Description"           column="DESCRIPTION"            type="String"   length="255" />
      <property name="UserDefined"           column="USER_DEFINED"           type="Boolean" />
      <property name="LogicalFieldName"      column="LOGICAL_FIELD_NAME"     type="String"   length="255" />
      <property name="Operator"              column="OPERATOR"               type="String"   length="35" />
      <property name="FieldValueType"        column="FIELD_VALUE_TYPE"       type="String"   length="35" />
      <property name="BusinessCaseTemplate"  column="BUSINESS_CASE_TEMPLATE" type="BinaryBlob"   length="1073741823" />
      <property name="CreatedBy"             column="CREATED_BY"             type="String"   length="20" not-null="true" />
      <property name="CreatedTime"           column="CREATED_TIME"           type="DateTime" not-null="true" />
      <property name="ModifiedBy"            column="MODIFIED_BY"            type="String"   length="20" not-null="true" />
      <property name="ModifiedTime"          column="MODIFIED_TIME"          type="DateTime" not-null="true" />
   </class>
</hibernate-mapping>