-->
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: EmptyInterceptor
PostPosted: Wed Sep 24, 2008 4:03 am 
Newbie

Joined: Fri Feb 29, 2008 7:05 am
Posts: 13
Location: New Delhi, India
Hi All,

I am stuck at a design issue and I seek the help of the Hibernate experts to guide me in this.

I have got 2 entities A & B. A has got one-to-many with B while B has got many-to-one relationship with A. Entity B's crud operations can only be fired when entity A's crud is fired i.e. user cannot directly affect entity B.

I am thinking of using an EmptyInterceptor to do crud operations when there is a crud operation on the entity A. I am doing this to make sure that B's crud operations are not always fired and they occur only when Hibernate does any crud operation on entity A.

Please let me know if this is the right approach. If not what else can I use, keeping in consideration:

- There can be many operations on B (multiple create, update, delete) when user makes a change to A.
- Changes in B should only happen when there is a change in its parent A.

Regards,
Nitin


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.