Joined: Tue Mar 25, 2008 4:14 am Posts: 7 Location: Israel
|
The trigger that I posted is a particular trigger that I need to have in my DB for my application purposes. In general trigger is a PL/SQL procedure that is invoked on particular events. In particular the trigger that I posted updates some table called shard_local_user each time table IQ_User is updated. It is just an example. You don't need to use triggers. You can put any DDL statement into <create> tag of <database-object> tag and it will be executed in your db. I gave it as an alternative to hbm2ddl in case some particular task is not working in hbm2ddl (as was my case). But in this solution you have to write yourself what exectly you want to be performed in DB. As opposed to hbm2ddl where Hibernate itself finds out what should be done to DB based on your hbm files
_________________ Best regards,
Michael Gantman
|
|