C# (CSharp) Habanero.BO.ClassDefinition RelationshipDef - 6 examples found. These are the top rated real world C# (CSharp) examples of Habanero.BO.ClassDefinition.RelationshipDef extracted from open source projects. You can rate examples to help us improve the quality of examples.
Related
Related in langs
Defines the relationship between the ownming Business Object (IBusinessObject and the related Business Object. This class collaborates with the RelKeyDef, the ClassDef to provide a definition Relationship. This class along with the RelKeyDef and RelPropDef provides an implementation of the Foreign Key Mapping pattern (Fowler (236) - 'Patterns of Enterprise Application Architecture' - 'Maps an association between objects to a foreign Key Reference between tables.') The RelationshipDef should not be used by the Application developer since it is usually constructed based on the mapping in the ClassDef.xml file. The RelationshipDef (Relationship Definition) is used bay a ClassDef to define a particular relationship. Each relationship has a relationship name e.g. A relationship betwee a person and a department may manager, employee etc. The related Class e.g. A Department definition would contain a relationship definition to a Person Class. (to allow for the person class to be in a different assemply the assembly name is also stored. The list of properties the define the Foreign key mapping of relationship between these two classes is stored using the RelKeyDef. The Relationship also stores additional information such as DeleteParentAction and order critieria. The DeleteParentAction defines any constraints that the relationship should provide in the case of the parent (relationship owner e.g. Depertment in our example) being deleted. E.g. If the department (parent) is being deleted you may want to delete all related object or prevent delete if there are any related objects. In cases where there are many related objects e.g. A Department can have many Employees the relationship may be required to load in a specifically order e.g. by employee number. The order criteria is used for this.