Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate triggers

 
nami shekar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Interceptors & Events. You can inspect/manipulate properties of an object before it is saved/updated/deleted etc...
 
nami shekar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since they are for react to events inside Hibernate, yes you need to change/implement them. It's not outside the Hibernate...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic