2004-09-28 Umadevi S <sumadevi@novell.com>
authorUmadevi S <uma@mono-cvs.ximian.com>
Tue, 28 Sep 2004 04:59:55 +0000 (04:59 -0000)
committerUmadevi S <uma@mono-cvs.ximian.com>
Tue, 28 Sep 2004 04:59:55 +0000 (04:59 -0000)
        * DataRow.cs - checked for Enforceconstraints, while using indices to search for related rows

svn path=/branches/mono-1-0/mcs/; revision=34460

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

index 1f25918ec26f5c8945cc364e5bc8a41ea95b304b..139998a12cbb7c4a5825473e72bd4bd60b52a706 100644 (file)
@@ -1,3 +1,6 @@
+2004-09-28 Umadevi S <sumadevi@novell.com>
+        * DataRow.cs - checked for Enforceconstraints, while using indices to search for related rows
+
 2004-09-24  Sureshkumar T  <tsureshkumar@novell.com>
 
        * DataSet.cs : Don't check constraints for dataset clear
index 00bb0d1bdbdcca71528716438e14b14ba014abaa..49c59a922dbaa3a0e33b3ff3905fe701b4bc25c1 100644 (file)
@@ -1038,7 +1038,9 @@ namespace System.Data {
                        int numColumn = parentColumns.Length;
                        if (HasVersion(version)) {
                                Index indx = relation.ParentTable.GetIndexByColumns (parentColumns);
-                               if (indx != null) { // get the child rows from the index
+                               if (indx != null &&
+                                   (Table == null || Table.DataSet == null ||   
+                                  Table.DataSet.EnforceConstraints)) { // get the child rows from the index
                                        Node[] childNodes = indx.FindAllSimple(childColumns, IndexFromVersion(version));
                                        for (int i = 0; i < childNodes.Length; i++) {
                                                rows.Add (childNodes[i].Row);