2004-06-27 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Sun, 27 Jun 2004 21:21:46 +0000 (21:21 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Sun, 27 Jun 2004 21:21:46 +0000 (21:21 -0000)
* XmlDataInferenceLoader.cs : It was not always filling relation
  child table information correctly. This fixes bug #60742.

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

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

index 454aaefdc37bcd91296b13cd2e19afe69e4611c2..5477819e4027cf04b34fd8d1faa5c98d7919a423 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-27  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlDataInferenceLoader.cs : It was not always filling relation
+         child table information correctly. This fixes bug #60742.
+
 2004-06-23 Umadevi S <sumadevi@novell.com>
        * UniqueConstraint.cs :changed a ifdef true to ifdef NET_1_1
 
index ac2a4ce544479b672051d0af2c26dda0af4c1d99..eee22a52e0a723bba4712df48ed7dd9d3fe84580 100755 (executable)
@@ -410,7 +410,16 @@ namespace System.Data
                                map = new TableMapping (tableName, ns);\r
                                map.ParentTable = parent;\r
                                tables.Add (map);\r
-                               if (parent != null)\r
+                       }\r
+                       if (parent != null) {\r
+                               bool shouldAdd = true;\r
+                               foreach (TableMapping child in parent.ChildTables) {\r
+                                       if (child.Table.TableName == tableName) {\r
+                                               shouldAdd = false;\r
+                                               break;\r
+                                       }\r
+                               }\r
+                               if (shouldAdd)\r
                                        parent.ChildTables.Add (map);\r
                        }\r
                        return map;\r