-->
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: Hibernate Interceptor onSave returns partially loaded object
PostPosted: Sun Sep 19, 2010 4:37 pm 
Newbie

Joined: Thu Nov 11, 2004 1:23 pm
Posts: 5
Location: New York
Hi,

I have JPA objects which I need to intercept. Interceptor.onSave() method of works fine for my Order object. I can see the original values for persistent and non-persistent fields. My Order object has one to many relationship to OrderLineItem. However, non-persistent fields are not populated when Interceptor.onSave() method is called for OrderLineItem. FYI, persistence is initiated by calling entityManager.persist(order). It seems as though for JPA associations are loaded using some sort of proxy objects which do not keep the original state of the objects. If anyone has suggestions for workaround I would appreciate it.


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.