/// <summary>
        /// This method retrieves a list of parent child relationships for this particual object.
        /// </summary>
        /// <param name="tableName">Name of the table to retrieve the definitions for</param>
        /// <returns></returns>
        private List <IRelationshipDefinition> GetTableRelations(string tableName)
        {
            List <IRelationshipDefinition> relationshipDefinitions = new List <IRelationshipDefinition>();
            //Use meta data access to retrieve the foreign key information
            DataTable foreignKeyIndexes = _metadataAccess.GetTableForeignKeyInformation(tableName);

            //Parse through each relationship returned in the data table
            foreach (DataRow foreignKeyRow in foreignKeyIndexes.Rows)
            {
                if (relationshipDefinitions.Count > 0)
                {
                    bool keyFound = false;
                    //Check if the key has already been added to the list of relations.
                    foreach (var definition in relationshipDefinitions)
                    {
                        if (definition.Name != foreignKeyRow["FK_NAME"].ToString())
                        {
                            continue;
                        }
                        //Append the additional properties to the relationship
                        //Note: these must be added as a comma seperated list
                        definition.ThisProperties    += "," + foreignKeyRow["FK_COLUMN_NAME"];
                        definition.RelatedProperties += "," + foreignKeyRow["PK_COLUMN_NAME"];
                        keyFound = true;
                        break;
                    }
                    //Don't create a new definition if the current one has been found
                    if (keyFound)
                    {
                        continue;
                    }
                }

                //Create a new RelationshipDefinition using the Foreign Key values
                RelationshipDefinition relationshipDefinition = new RelationshipDefinition
                {
                    Description = string.Empty,
                    Name        = foreignKeyRow["FK_NAME"].ToString(),
                    FullName    = foreignKeyRow["FK_NAME"].ToString(),
                    //This is the name of the Parent Object
                    ThisObjectDefinitionFullName = foreignKeyRow["FK_TABLE_NAME"].ToString(),
                    //This is the name of the field or fields in the Parent Object.
                    //Note: Multiple values must be a comma seperated list
                    ThisProperties = foreignKeyRow["FK_COLUMN_NAME"].ToString(),
                    //This is the name of the Referenced Object
                    RelatedObjectDefinitionFullName = foreignKeyRow["PK_TABLE_NAME"].ToString(),
                    //This is the name of the field or fields in the Referenced Object.
                    //Note: Multiple values must be a comma seperated list
                    RelatedProperties = foreignKeyRow["PK_COLUMN_NAME"].ToString(),
                };

                relationshipDefinitions.Add(relationshipDefinition);
            }


            return(relationshipDefinitions);
        }