[Mono-bugs] [Bug 650411] DataRow.GetParentRows doesn't work with DataRowVersion.Original
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Oct 31 17:39:26 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=650411
https://bugzilla.novell.com/show_bug.cgi?id=650411#c1
--- Comment #1 from Clinton Volzke <cvolzke at live.com.au> 2010-10-31 21:39:25 UTC ---
Proposed fix to DataRow.GetParentRows below. See changes marked with ***.
try {
Index index = relation.ParentTable.FindIndex(parentColumns);
if (index != null
&& version == DataRowVersion.Default // *** line added
) { // get the parent rows from the index
int [] parentRecords = index.FindAll (tmpRecord);
for (int i = 0; i < parentRecords.Length; i++)
rows.Add (parentColumns [0].Table.RecordCache [parentRecords
[i]]);
} else { // no index so we have to search manualy.
foreach (DataRow row in relation.ParentTable.Rows) {
bool allColumnsMatch = false;
if (row.HasVersion (version)) { // *** changed from
'DataRowVersion.Default' to 'version'
allColumnsMatch = true;
int parentIndex = row.IndexFromVersion (version); //
changed from 'DataRowVersion.Default' to 'version'
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list