This content has been marked as final.
Show 1 reply
-
1. Re: primary and secondry table insertion
alrubinger Aug 16, 2007 11:37 AM (in response to kaviarasu)If you're using Entity Beans, you can attach a Hibernate Event Listener or JPA Event Annotations (ie http://java.sun.com/javaee/5/docs/api/javax/persistence/PrePersist.html, checking that when a row is added for your "table1" bean, the logic you'd like done is performed...
This keeps your logic at the application level, rather than relying upon DB triggers (as a matter of my personal preference).
S,
ALR