Edit fields in form showing only committed values

I have an edit screen that edits customer record (in a form) and related orders (in a table).
Order entity is a COMPOSITION of Customer entity.

My problem is as follows:
(1) Let us say in the Order table there is a row that has a field currently storing a value of 5.
(2) User edits the row and changes the field value to 3 and clicks Ok.
(3) User goes to edit the record again but now seeing original value of 5.

So the problem is
Whenever user edits a record, they are seeing persistent or committed values instead of what is edited whenever they go back to edit before clicking “Save” button

Please help me. I am desperate in solving this problem
Thanks

This was caused by a logical error in my code.

I thought the “onInitEntity” method was only fired when a new record for an instance is created.
I however discovered that it is also fired whenever an ‘uncommitted’ collection item is edited within a table.