[Mono-bugs] [Bug 74924][Maj] Changed - DataSet cascading not working on change

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 14 20:35:56 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by george.barbarosie at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74924

--- shadow/74924	2005-05-12 09:39:17.000000000 -0400
+++ shadow/74924.tmp.26014	2005-05-14 20:35:56.000000000 -0400
@@ -42,6 +42,19 @@
 Imagine you add a row in the primary table (clients) and a row in
 child table (orders) referencing the new client. When submitting
 changes in clients the new row gets a new primary key (autoincrement),
 but the order still references a now inexistent client. When
 submitting changes in orders you generate a foreign key violation in
 the database backed.
+
+------- Additional Comments From george.barbarosie at gmail.com  2005-05-14 20:35 -------
+Pretty obviously, GetChildRows(fkc, DataVersion.Default) in
+DataRow.CheckChildRows(ForeignKeyConstraint, DataRowAction, Rule) will
+return 0 rows for this case; that's because we already exited edit
+mode (see EndEdit's code) and _current is already pointing to new
+version of the row.
+
+Dumb solution: modify CheckChildRows to accept record index and pass
+old record to it. Unfortunately private method GetChildRows needs also
+be overloaded.
+
+Will attach (working) proposed fix.


More information about the mono-bugs mailing list