I got the same problem with large string (text field)... I ended up having
to map to a custom stringclob I think for image you have to map to a
BinaryBlob...
do a google search for
Nhibernate StringClob then
Nhibernate Clob or BinaryBlob that should get to headed in the right
direction.
Once you figure out the appropriate custom type to do it via fluent is
something like
CustomType("StringClob");
CustomSqlType("nvarchar(Max)");
On Mon, Jan 3, 2011 at 6:10 AM, Ivan Zlatev <[email protected]> wrote:
> I have upgraded from Fluent Nhibernate 1.0 with Nhibernate 2.1 to pre-
> release 1.x with NHibernate 3.0 GA and have hit a regression, which I
> don't know if it's Fluent Nhibernate one or Nhibernate one. I have an
> Image property of type System.Drawing.Image and I have mapped it like
> this:
>
> Map (food => food.Image)
> .Length (int.MaxValue)
> .Nullable ();`
>
> The Image column in the table is of type varbinary(MAX).
>
> The generated hbm is:
>
> <property name="Image" type="System.Drawing.Image, System.Drawing,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
> <column name="Image" length="2147483647" not-null="false" sql-
> type="varbinary(max)" />
> </property>`
>
> However no matter what I do the binary blob is truncated to 8000 bytes
> when serialized with the current FNH and NH versions. That didn't used
> to be the case.
>
> Ideas of why this is happening and how to fix/workaround it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.