Hi everybody,
I have a problem updating fields of an object containing a blob. If the
blob is large enough it is truncated to a fixed size depending on the blobs
size. It can be fixed by refreshing the object in the session or flush
manually, but I do not understand why the flush before the commit
(flushmode comit) does not resolve the problem. This only happens if the
object is updated within a loop together with an object having a smaller
blob in front of the list or only large blobs (then all large blobs are
truncated).
Following a code example:
DbSession.BeginTransaction()
var os = new List<object>{DbSession.Get<object>(objectWithSmallData),
DbSession.Get<object>(objectWithLargeData)};
foreach(var o in os)
{
//DbSession.Refresh(o); will fix the problem
o.Name = "xyz";
o.Update();
}
DbSession.Comit()
In this case the blob saved in objectWithLargeData.Data will be truncated.
The DbSession.Refresh() will fix the problem. The blob is mapped with
FluentNhibernate like this: Map(x => x.Data, "DATA");
Anyone any idea where this strange behavior could come from?
Greetings
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.