update « Interceptor « JPA Q&A





1. Update father on interceptor    stackoverflow.com

My model:

 public class Father {
  Set<Son> sons = new HashSet<Son>();
  String name = null;
  Date lastSonModifyDate = null;
  // ... other fields and setters/getters
 }
 public ...

2. Update father on interceptor    forum.hibernate.org

My model: Code: public class Father { Set sons = new HashSet(); String name = null; Date lastSonModifyDate = null; // ... other fields and setters/getters } public class Son { Father father = null; String name = null; Date lastModifyDate = null; // ... ...

3. update never occurs when using an Interceptor    forum.hibernate.org

Hi, I'm using Hibernate 2.1.1, Windows 2000, Jdk 1.3 and DB2 7.2. I'm having trouble with a parent-child relationship, as explained in this thread ( http://forum.hibernate.org/viewtopic.php?t=927180). I'm trying to implement my Involved object as a Persistent class - following the Hibernate documentation chapter 9.4 (http://www.hibernate.org/hib_docs/reference/html/parent-child.html#parent-child-update). I've also implemented an Interceptor as shown in the same chapter: Code: public class MyInterceptor implements ...

4. Interceptor and update    forum.hibernate.org

Author Message meagle Post subject: Interceptor and update Posted: Wed Mar 17, 2004 9:04 am Newbie Joined: Tue Aug 26, 2003 12:31 pm Posts: 14 I have a situation where I need to have disconnected objects from a session so that they can be edited in another layer and then sent back to Hibernate for persistence. I get this ...

5. Interceptor's onFlushDirty() not invoked on session.update()    forum.hibernate.org

Hibernate version: 3 I have a multi-tier web application where the presentation tier is first retrieving an object and then saving it after making changes to it. On the server, I have a stateful session bean that keeps a reference to the object when it is first retrieved and then updates the same with the changes received from the presentation tier ...

6. Interceptor and update() calls.    forum.hibernate.org

We have a modifiedDate property in all of our model objects, and I was attempting to use an interceptor to set that value on any save or update call. So, in the onFlushDirty() and onSave() methods, I set the modifiedDate property for the entity to "new Date()". This is working great, except that we've found that under some circumstances the onFlushDirty() ...

7. Interceptor not updating    forum.hibernate.org

Hi all, I've an Hibernate Interceptor in order to implement an audit system. I've two columns for insert info on each table, and other two for update info, that I've mapped with inheritance. I put the inserts/updates into both sets in onSave, onFlushDirty methods, and modifty each entity in preFlush / postFlush methods. When inserting all it's ok, but when I ...