prepare_sql = true (creating prepared queries) makes NHibernate set up wrong size for byte arrays larger than 8000

Description

Mapping:

<class name="Document" table="documents_document" lazy="true" batch-size="10">
<id name="oid" type="System.Guid" unsaved-value="00000000-0000-0000-0000-000000000000" access="field.camelcase">
<generator class="guid.comb" />
</id>
<property name="Contents" access="field.camelcase" type="BinaryBlob" length="20000"></property>
</class>

Field:

private byte[] contents;

When updating the field, NHibernate sets the size into the IDbCommandParameter to 8000, causing the data to be truncated.

Regards
Carsten

Environment

None

Activity

Show:

Fabio Maulo June 14, 2009 at 4:28 PM

Well... your problem was fixed... others in working.

Fabio Maulo June 13, 2009 at 2:40 PM

Well... there are various bugs.
1) BinaryBlob is ignored instead BinarySqlType is used
2) length is ignored
3) probably the field type is ignored.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created June 12, 2009 at 4:36 AM
Updated July 22, 2009 at 7:21 AM
Resolved June 14, 2009 at 4:28 PM
Who's Looking?