-->
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: JPA 1.0 - Problem with merging (updating) Lazy simple field
PostPosted: Mon Feb 01, 2010 5:45 am 
Newbie

Joined: Fri Nov 07, 2008 1:57 pm
Posts: 8
Let's say, I have a JPA entity, no associations, several persistent simple type fields, and among them one with Lazy loading fetch type:
Code:
@Basic(fetch=FetchType.LAZY)
@Column(name = "SBL_CONTENT")
private String content;

When I change content and try to merge the entity, nothing happens, no update statement is executed. Also, when I change any other non-Lazy field, update statement is executed, but only for those fields, without 'content' field in statement.

But, when I try to remove Lazy loading, like this:
Code:
@Column(name = "SBL_CONTENT")
private String content;

update statement is executed, with all the fields.

How can I update Lazy simple type field??


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.