-->
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.  [ 3 posts ] 
Author Message
 Post subject: onFlushDirty
PostPosted: Thu Jun 16, 2005 10:34 am 
Newbie

Joined: Tue May 10, 2005 3:57 am
Posts: 5
Hibernate version: 3.0.5

Hi,

I created an interceptor.
When I add or remove objects from a set contained in my object the method onFlushDirty in not called, even though all the SQL queries work properly!

Is this a normal behaviour?

Thanks for your help

Jean


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 8:21 am 
Newbie

Joined: Tue May 31, 2005 8:48 am
Posts: 11
Location: Blumenau - Santa Catarina - Brasil
hi

you have set interceptor in your session.
example :

SessionFactory sf = null;
Session ss=null;
Configuration cfg= new Configuration().addClass(Insumo.class);
sf=cfg.buildSessionFactory();
ss= sf.openSession(new AuditLogInterceptor());
//AuditLogInterceptor implements interface Interceptor


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 9:11 am 
Newbie

Joined: Tue May 10, 2005 3:57 am
Posts: 5
Thanks for your reply.

Yes I did all this. What I noticed is that the interceptor works properly, when "normal" properties are modified.
If I modify a set (e.g. remove an item from within the set) contained in my class, the interceptor is not called. It is only called for the item which was removed.

So I presume that when you have a one-to-many relationship the interceptor is only called on the item being on the many side, and not the side where the set is located.

So my question was this: Do I assume right?

Thanks

Jean


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.