/// <summary>ctor</summary>
		internal CsDbResolvesRelationAttribute(CsDbCodeRelation relation) : this(relation.Architecture.Name)
		{
			PkTable = relation.PkKey.Architecture.Owner.Name;
			PkColumn = relation.PkKey.Architecture.Name;

			FkTable = relation.FkKey.Architecture.Owner.Name;
			FkColumn = relation.FkKey.Architecture.Name;
		}
		internal CsDbcTable_ForeignKeyMethodBundle(CsDbCodeRelation relation) : base(relation)
		{
			relation.FkMethods = this;
			relation.PkMethods = PkTable.Methods.PrimaryKey;


			FindMethod = new CsDbcTable_ForeignKeyFindMethod(relation, this);
			LoadThenFindMethod = new CsDbcTable_ForeignKeyLoadThenFindMethod(relation, this);
			FindOrLoadMethod = new CsDbcTable_ForeignKeyFindOrLoadMethod(relation, this);
		}
Beispiel #3
0
		/// <summary>Creates the code base relations and maps it to the associated tables. </summary>
		public static CsDbCodeRelation Create(CsDbArcRelation architecture, CsDbcTableRow_Column pkKey, CsDbcTableRow_Column fkKey)
		{
			var item = new CsDbCodeRelation(architecture, pkKey, fkKey);
			if (pkKey.Row == fkKey.Row)
				pkKey.Row.Table.Relations.Add(item);
			else
			{
				pkKey.Row.Table.Relations.Add(item);
				fkKey.Row.Table.Relations.Add(item);
			}
			return item;
		}
		internal CsDbcTableRow_AssociatedProperty(CsDbCodeRelation relation) : base(relation)
		{
		}
		internal CsDbCodeRelationFileTemplate(CsDbCodeRelation relation)
		{
			Relation = relation;
		}
		internal CsDbcTable_ForeignKeyFindOrLoadMethod(CsDbCodeRelation relation, CsDbcTable_ForeignKeyMethodBundle owner) : base(relation)
		{
			Owner = owner;
		}
		internal CsDbcTableRow_ReferencingProperty(CsDbCodeRelation relation) : base(relation)
		{
		}
		public CsDbcSet_RelationEntry(CsDbCodeRelation relation)
		{
			Relation = relation;
		}