-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: flush causes update on field of type @Lob/Byte[] in 3.6.0
PostPosted: Mon Dec 27, 2010 7:07 am 
Newbie

Joined: Mon Dec 27, 2010 7:02 am
Posts: 2
We're encountering an issue with Hibernate 3.6.0-Final.

I've created a bug report, but since it's the holidays and it hasn't been picked up, I was wondering if anyone here experienced the same issue and possible has a workaround?

Here is the issue, pasted verbatim:
===================================

I have a field that is mapped as follows:

@Lob
@Column(name = "picture")
private Byte[] picture;

When retrieving the entity with a regular session.load() or criteria.list(), upon session flush, an update statement is issued for the field.

In an interceptor, I can see in the onFlushDirty method that the byte arrays in the currentState en previousState parameters are different objects, but with the same byte-content. All the other objects in currentState and previousState are identical.

My guess is that this causes Hibernate to think the contents of the field changed?

This behavior did not happen in 3.5.x (tested up to .6), and because the entity is versioned, upon each retrieval, the version field is incremented, which is highly undesirable and causes our application to stop functioning (supposedly concurrent updates).

The reason we're using 3.6.0-Final is because we're using JBoss AS 6.0.0-Final.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.