2004-10-04 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 4 Oct 2004 13:36:37 +0000 (13:36 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 4 Oct 2004 13:36:37 +0000 (13:36 -0000)
* DataSet.cs : For a row, when a relation is not nested, then it is
  still output target since it won't be written as a child of its
  parent. It fixes bug #66379.

svn path=/trunk/mcs/; revision=34670

mcs/class/System.Data/System.Data/ChangeLog
mcs/class/System.Data/System.Data/DataSet.cs

index 71242b8825e898bcd795c10f911972b2989e4379..ab67bdb95ee0911e7fbe831ab4af31eb3e7c0a0a 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-04  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * DataSet.cs : For a row, when a relation is not nested, then it is
+         still output target since it won't be written as a child of its
+         parent. It fixes bug #66379.
+
 2004-10-03  Atsushi Enomoto  <atsushi@ximian.com>
 
        * DataSet.cs : Attribute constraint field XPath must be written as
index f6a66405b1f2f04bcc2eab57a6eb1aca195f506c..f41347454d5bf6e985792702862a4aaeb7d6cc40 100644 (file)
@@ -1194,16 +1194,22 @@ namespace System.Data {
                                        case 0:
                                                break;
                                        case 1:
+                                               if (!oneRel.Nested)
+                                                       break;
                                                if (row.GetParentRow (oneRel) != null)
                                                        continue;
                                                break;
                                        case 2:
                                                bool skip = false;
-                                               for (int i = 0; i < table.ParentRelations.Count; i++)
-                                                       if (row.GetParentRow (table.ParentRelations [i]) != null) {
+                                               for (int i = 0; i < table.ParentRelations.Count; i++) {
+                                                       DataRelation prel = table.ParentRelations [i];
+                                                       if (!prel.Nested)
+                                                               continue;
+                                                       if (row.GetParentRow (prel) != null) {
                                                                skip = true;
                                                                continue;
                                                        }
+                                               }
                                                if (skip)
                                                        continue;
                                                break;