internal bool IsInRelation()
{
DataKey key;
DataRelationCollection rels = _table.ParentRelations;
Debug.Assert(rels != null, "Invalid ParentRelations");
for (int i = 0; i < rels.Count; i++)
{
key = rels[i].ChildKey;
Debug.Assert(key.HasValue, "Invalid child key (null)");
if (key.ContainsColumn(this))
{
return true;
}
}
rels = _table.ChildRelations;
Debug.Assert(rels != null, "Invalid ChildRelations");
for (int i = 0; i < rels.Count; i++)
{
key = rels[i].ParentKey;
Debug.Assert(key.HasValue, "Invalid parent key (null)");
if (key.ContainsColumn(this))
{
return true;
}
}
return false;
}