I have a situation where I have master and detail tables, using TOracleDataset with CachedUpdates True. I insert a record into the master, post, then Session.ApplyUpdates([master], False). I add some detail records, post, then Session.ApplyUpdates([detail], False). I then make some more changes to the master record, post, and finally go to commit: session.ApplyUpdates([master, detail], True). I do not have Master set in the detail dataset - I apply the keys manually in OnNewRecord.
I get an Oracle Key Violation on the master table when I apply the second update. Why? Looking at Oracle Monitor I see that DOA tries to insert the same master record twice; once with each ApplyUpdates.
I am using Delphi XE and DOA 4.1.
I get an Oracle Key Violation on the master table when I apply the second update. Why? Looking at Oracle Monitor I see that DOA tries to insert the same master record twice; once with each ApplyUpdates.
I am using Delphi XE and DOA 4.1.