method « Interceptor « JPA Q&A





1. Interceptor : onFlushDirty method    forum.hibernate.org

In my interceptor, I'm sure the method OnFlushDirty is never called when my entity has its array 'paramed" changed. Is it normal ? I'd like to add the mapping of my array :

2. onFlushDirty method of Interceptor is called too many times    forum.hibernate.org

tenwit wrote: onFlushDirty is called once per interceptor, every time a dirty object is flushed. If there are hundreds of dirty objects in your session, you'll get hundreds of onFlushDirty calls. IMHO,the onFlushDirty method is called when a method-spanned transaction is over and hibernate is going to flush all the changed data to database.if onflushDirty returns true,the dirty properties will be ...

3. Collections in Method Interceptor    forum.hibernate.org

hi everyone, i am using method Interceptor to intercept methods (AOP). i am able to intercept the method, the method returns a collection of objects which i want to manipulate i.e. i want to manipulate the collection. i am able to access the intercepted method but not able to access the collection returned by the method. here is the code which ...

4. Custom METHOD Interceptor    forum.hibernate.org

Hi and thanks for the reply. I read the article, but it doesn't do what I want. As far as I understand, the Interceptor that you use when you open the session is to intercept DB actions: Save, Update, etc. What I want to do is intercept methods of my objects. Hibernate uses proxies to intercept methods so it can lazy-load ...

5. Interceptor onCollection*() methods    forum.hibernate.org

I'm writing an interceptor, including the various onCollection[Recreate, Update, Remove] methods. I'd like to note which collection is being changed. That is, if a collection in my Foo object, as mapped to property Bar, is being updated, I want access to the string "bar". The collection parameter is a PersistentCollection, so I can call getOwner(). But I can't seem to find ...

7. DB entities modificarion in Interceptor methods    forum.hibernate.org

Hi all. I need to modify an A entity when other (unrelated) B entity is deleted. What I need is to load A from DB when interceptor executes 'onDelete' method over B entity. The problem is that I can't open a new transaction because I need the Hibernate rollback management to undo my manual modification if anything goes wrong during the ...