Hello.
There is one problem with not neede update-queries with TObjectManager.Save(Obj) execute.
Delphi 10.2.2, Aurelius 3.10, FireDAC with PostgreSQL.
Mapping of two classes:
[Entity, Table('hr_inv.param_value'), Sequence('hr_inv.PV_SEQ'), Id('ID', TIdGenerator.IdentityOrSequence)]
TPIParamValue = class (TParamValue)
private
[Association([TAssociationProp.Lazy], [])]
[JoinColumn('pi_result_id', [TColumnProp.NoUpdate])]
fPIResult: Proxy<TPIResult>;
...
end;
[Entity, DiscriminatorValue('5')]// inheritance strategy used
TPIResultParametrized = class (TPIResult)
private
[ManyValuedAssociation([TAssociationProp.Lazy], CascadeTypeAllRemoveOrphan, 'fPIResult')]
fPVs: Proxy<TPIParamValueList>;
end;
When I try to execute ObjManager.Save(APIResult: TPIResultParametrized) and watch to fdmonitor, I see one insert for main object APIResult (it's ok), one insert per each ManyValued-item (it'ok too), and after one update per ManyValued item, which updates only pi_result_id field, which marked as TColumnProp.NoUpdate.
Why Aurelius run this updates? All inserts executes in 100ms in my test machine, but updates executes about 3 seconds (triggers, indexes, etc...). This field never changes at all, why Aurelius ignore mapping?
Full FDMonitor trace here: https://www.dropbox.com/s/ec2udjlr2f1qcb4/Trace_180116_1124.log?dl=0