| Author |
Hibernate triggers
|
nami shekar
Greenhorn
Joined: Sep 14, 2011
Posts: 17
|
|
Hi Friends,
I need to know how to create triggers in hibernate.
I want to create a trigger on inserting into one table. On inserting into one table i want to insert or update another table.
how this can be done.
Any suggestions would be of great help.
Thanks in advance
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
|
See Interceptors & Events. You can inspect/manipulate properties of an object before it is saved/updated/deleted etc...
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
nami shekar
Greenhorn
Joined: Sep 14, 2011
Posts: 17
|
|
Thanks for the quick reply Vijitha,
So we need to change in configuration file and class that implements the event.?
Is this the only way it can be done?
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
|
Since they are for react to events inside Hibernate, yes you need to change/implement them. It's not outside the Hibernate...
|
 |
 |
|
|
subject: Hibernate triggers
|
|
|