Hi,
I am a newbie to Hibernate. Got a few doubts I need to clear up.
1) Are transactions meant to be atomic? I.e. each transaction should only be equivalent to one sql statement?
2) Say I have multiple deletions I want to do and these deletions are on different tables which have parent-child relationship. Currently I only initiate 1 transaction and uses it to perform all the deletions. Finally then I call a commit(). Will all the deletions be performed at one go?
3) Based on the previous scenario, say one of the deletions (in the middle) fails. How can I ensure that I rollback all the previous deletions I have done earlier?
Hope someone can help on this. Thanks.
Regards,
Nicole
|