I'm using two FDQuery
with master-detail relationship and found a problem: using the CachedUpdates
property and relating both FDQuery
to a FDSchemaAdapter
. If you call " Insert / Append " in Mestre
and then (with Mestre
dsinsert
) is called an "Insert" and then a "Post" in detail record, the the following error occurs:
[FireDAC] [DatS] -16. Can not process - no parent row. Constraint [ForeignKeyConstraint].
I know this is because in the "Post" order, the child record is being inserted without a parent record being posted yet, but in the database the foreign key is "Deferred".
So, how do I FireDac
ignore this restriction without disabling the DetailCascade
property and keeping the cascading "delete / update" functionality cached?
I've tried to use FDSchemaAdapter.DatSManager.EnforceConstraints
, but the result is similar to disabling the DetailCascade
property of FDquery
.
Note: I'm using Delphi XE5.