Hi All,

Probably this is an stupid question, but I don't find any solution by myself, so here I am.

I'm working with MySQL 5.1

I've to do several table maintenance GUI, it's and ease job, no complex rules at all, just code and several fields most of them just text.

I want a pessimistic locking, I'm not agree with does applications that when you has filled all the record and press "Save", the application responds "you have lost your work due another person has modified this record before you".

what I do to avoid this, is open a transaction, do a select for update, and keep the transaction opened until the user press the save/cancel button.
This behaviour is OK for the basic one's. My problem raises when a form opens another form (ex:families opens sub-families). In that case, I have the transaction already opened, in one way is ok, since no one is going to delete the family that I'm working on sub-families, but in the other hand, when I commit the second form, it really commit a subtransaction so if the root form doesn't commit I lose all the changes made in sub-family form. Since maybe there is no changes on families form ( I just cross to reach sub-families form) even the save button is disabled.

which approach you use to do ?