Page 1 of 1

Deletes parent record before child

Posted: Sat 10 Sep 2011 19:42
by afva
Hello,

I have 2 tables: a master (CT_ROLPATRONEN) and a detail (CT_ROLP_PROF).
After I delete the detail-record I delete the parent.
When I look in the changeset it looks o.k;

ChangeSetCount INS - UPD - DEL ================== > 0 - 0 - 2
Deletes: Comtare.InstellingenComtare.CT_ROLP_PROF
Deletes: Comtare.InstellingenComtare.CT_ROLPATRONEN

When I actually do the submitChanges() I get the OracleMessage ORA-2292: child-records found.
(I only have 1 detail record with this parent)
The generated statements are:
BEGIN DELETE FROM UPLUS.CT_ROLPATRONEN WHERE ID = :key1; DELETE FROM UPLUS.CT_ROLP_PROF WHERE ID = :key2; END;

So...He first deletes the parent instead of the child!!
Why is that? How can I change this?

BTW My bindings are:
C#:
ObservableCollection rolColl;
CollectionViewSource rolCVS;

rolCVS = TryFindResource("rolCVS") as CollectionViewSource;
_adapter.getAllRols(ref rolColl);
rolCVS.Source = rolColl;

XAML:



Posted: Tue 13 Sep 2011 15:29
by StanislavK
Thank you for the report. We have reproduced this issue, we will inform you when it is fixed.