0
I’m using two FDQuery with master-detail relationship and found a problem: using property CachedUpdates and relating both FDQuery à um FDSchemaAdapter. Call "Insert / Append" in the Mestre and then (with the record Mestre in dsinsert) is called an "Insert" and then a "Post" in the detail record, the following error occurs:
[Firedac] [Dats] -16. Can not process - no Parent Row. Constraint [Foreignkeyconstraint].
I know this is because in the order "Post", the child record is being entered without a parent record having been posted yet, but in the foreign key database is "Deferred".
So how do I get the FireDac ignore only this restriction without disabling the property DetailCascade and maintain cached cascading "delete/update" functionality?
I’ve tried to use FDSchemaAdapter.DatSManager.EnforceConstraints, but the result is similar to disabling the property DetailCascade of FDquery.
Note: I’m using Delphi XE5.