-->
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.  [ 2 posts ] 
Author Message
 Post subject: merge not working with @Lob on insert
PostPosted: Wed Apr 05, 2006 6:51 pm 
Newbie

Joined: Mon Apr 03, 2006 10:44 pm
Posts: 2
When merging an entity it appears that @Lob blobs are not being persisted. I've seen this when merging a newly created entity - I haven't tested whether the problem also exists when merging a detached entity.

I have an entity with a blob:
Code:
    @Lob
    @Column(name = "DATA")
    private Blob data;


This works:
Code:
FileAttachment attach = new FileAttachment();
...
attach.setData(manager.createBlob(input));
manager.persist(attach);

...
FileAttachment attach = manager.lookupFileAttachment(2L);
assertNotNull(attach.getData());


But this doesn't:
Code:
FileAttachment attach = new FileAttachment();
...
attach.setData(manager.createBlob(input));

attach = manager.merge(attach);
assertNotNull(attach.getData()); //FAILS
...
attach = manager.lookupFileAttachment(2L);
assertNotNull(attach.getData()); //FAILS


I've only seen this happening to the blob. Other types appear to merge successfully.

Versions:
- hibernate 3.2.0-cr1
- hibernate-annotations 3.1beta9
- hibernate-entitymanager 3.1beta7


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 16, 2006 11:56 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Can you post a runable test case to JIRA? This seems to be an hibernate core issue

_________________
Emmanuel


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

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.