Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:2000_concepts:0200_basics:0400_reference_attributes [2022/08/21 12:10] – ↷ Links adapted because of a move operation administratordocs:2000_concepts:0200_basics:0400_reference_attributes [2025/06/11 07:41] (current) – [Matching and non-matching relationships] aware_support3
Line 1: Line 1:
 +{{tag>business_object attribute reference_attribute relationships concepts}}
 [<10>] [<10>]
 ====== Reference Attributes ======= ====== Reference Attributes =======
Line 18: Line 19:
 With matching relationships if an attribute of one business object refers to another business object there is a reference attribute in this other object (matching attribute) that refers to the first object. For example, if the ''Account'' object refers to the ''Transaction'' object through an attribute with the name ''MyTransactions'' there may be a matching attribute in the ''Transaction'' object called ''MyAccount'' that refers to the Account object. This is shown on the picture below: With matching relationships if an attribute of one business object refers to another business object there is a reference attribute in this other object (matching attribute) that refers to the first object. For example, if the ''Account'' object refers to the ''Transaction'' object through an attribute with the name ''MyTransactions'' there may be a matching attribute in the ''Transaction'' object called ''MyAccount'' that refers to the Account object. This is shown on the picture below:
  
-{{ documentation:images:reference_explainer.png?nolink&590 |}}+{{ docs:images:reference_explainer.png?nolink&590 |}}
  
 Note that the ''MyTransactions'' attribute on the ''Account'' business object represents a “multiple” relationship (account may have multiple transactions) whereas the matching ''MyAccount'' attribute in the ''Transaction'' object represents a “single” relationship (transactions belong only to one account). Generally speaking, any combinations of single and multiple references are possible within the matching relationship. Note that the ''MyTransactions'' attribute on the ''Account'' business object represents a “multiple” relationship (account may have multiple transactions) whereas the matching ''MyAccount'' attribute in the ''Transaction'' object represents a “single” relationship (transactions belong only to one account). Generally speaking, any combinations of single and multiple references are possible within the matching relationship.
Line 26: Line 27:
 With non-matching relationships there are no matching attributes on the referred object. Consequently if an instance of the second object is added to the first object in the Operation Mode only the first object will know that it has references to the instance of the second object – the instance of the second object will not know that some instance of the first object refers to it. Thus navigation from the instance of the second object directly to the instance of the first object will not be possible. Note that if the reference attribute on the first object has no matching attribute in the second object it does not mean that the second object may not refer to the first object at all through its own reference (matching or non-matching). If such reference does exist it is a completely different relationship. This is shown in the example below (''FamilyMember'' object has a non-matching single relationship to its ''Family'' and the ''Family'' object has independent non-matching single relationship to the ''FamilyMember'' object – ''HeadOfFamily''): With non-matching relationships there are no matching attributes on the referred object. Consequently if an instance of the second object is added to the first object in the Operation Mode only the first object will know that it has references to the instance of the second object – the instance of the second object will not know that some instance of the first object refers to it. Thus navigation from the instance of the second object directly to the instance of the first object will not be possible. Note that if the reference attribute on the first object has no matching attribute in the second object it does not mean that the second object may not refer to the first object at all through its own reference (matching or non-matching). If such reference does exist it is a completely different relationship. This is shown in the example below (''FamilyMember'' object has a non-matching single relationship to its ''Family'' and the ''Family'' object has independent non-matching single relationship to the ''FamilyMember'' object – ''HeadOfFamily''):
  
-{{ documentation:images:family_tree_reference_example.png?nolink&590 |}}+{{ docs:images:family_tree_reference_example.png?nolink&590 |}}
  
 ===== Peer, Parent and Child relationships ===== ===== Peer, Parent and Child relationships =====
Line 39: Line 40:
 The above behaviour saves the trouble of configuring rules to delete child instances explicitly. The above behaviour saves the trouble of configuring rules to delete child instances explicitly.
  
-See also: [[start:2000_concepts:0200_basics:helpusingreferencesoperationmode|Working with References in the Operation Mode]]. +See also: [[Working with References in the Operation Mode]].
  
 +===== Video =====
 +{{page>docs:5000_videos:040_relationships}}
  
  • Last modified: 2022/09/13 18:07