I have a Firebird 3 database with a master-detail setup on two tables. Suppose that I am currently viewing the third record in the detail table. If I edit any field in the master record, the current record in the detail table is reset to the first record.
Example:
Code: Select all
MasterTable.Edit;
while not(DetailTable.Eof) do
begin
MasterTable['TotalOrders'] := MasterTable.FieldByName('TotalOrders').AsCurrency + DetailTable.FieldByName('OrderValue').AsCurrency; // <-- resets detail table to first record
DetailTable.Next;
end;
MasterTable.Post;
Is this expected behaviour?
PS: CachedUpdates = False | LocalMasterDetail = True
Thank you.