Page 1 of 1

rollbackEditedRecords strangeness

PostPosted: Fri Apr 29, 2011 12:21 pm
by patrick
Hi,

I have a record in a transaction and add related records in a separate dialog. The dialog has a save and cancel button. The cancel button cannot rollback the transaction, because then my master record is also gone. To only "rollback" the single related record, I thought I use rollbackEditedRecords(). That works fine for the first related record I add. New record created, dialog opens, cancel button closes dialog and record is gone. It does not, however, work for any other record I add to the main record. In that case, getEditedRecords() also returns an empty array...

Is there something I do wrong?

Thanks
Patrick

Re: rollbackEditedRecords strangeness

PostPosted: Fri Apr 29, 2011 12:35 pm
by patrick
I noticed that the record's data is cleared, but the record itself is still there...

Re: rollbackEditedRecords strangeness

PostPosted: Fri Apr 29, 2011 1:37 pm
by jcompagner
if you create a new record that is not yet saved to the database
and you call databaseManager.rollbackEditedRecords(record) then that records should be removed from its foundset.

if you have a case where it doesn't do that please make a case.

Re: rollbackEditedRecords strangeness

PostPosted: Fri Apr 29, 2011 1:50 pm
by patrick
I have a case where it does not work like that, yes.

Tried to create a sample, but there it works. Will investigate further...