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/25 00:00] – ↷ Page moved from 2000_concepts:0200_basics:0400_reference_attributes to docs:2000_concepts:0200_basics:0400_reference_attributes 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.
  
-Matching relationships are very convenient as far as navigation between objects is concerned. In the example above once an instance of the ''Account'' object has been added to a particular ''Transaction'' in the Operation Mode the added ''Account'' will automatically have the Transaction in its list of transactions and vice versa – if an instance of a ''Transaction'' has been added to the list of transactions on the ''Account'', the ''Account'' is also automatically attached to the ''Transaction''. The corresponding forms of both the ''Account'' and ''Transaction'' objects will automatically allow navigation to the referred instances (unless presentation options are explicitly specified not to allow this – see [[2500_config_apps:0700_add_edit_attributes:0500_ref_attrib:0000_start#Presentation_Options_for_References|Presentation Options for References]]).+Matching relationships are very convenient as far as navigation between objects is concerned. In the example above once an instance of the ''Account'' object has been added to a particular ''Transaction'' in the Operation Mode the added ''Account'' will automatically have the Transaction in its list of transactions and vice versa – if an instance of a ''Transaction'' has been added to the list of transactions on the ''Account'', the ''Account'' is also automatically attached to the ''Transaction''. The corresponding forms of both the ''Account'' and ''Transaction'' objects will automatically allow navigation to the referred instances (unless presentation options are explicitly specified not to allow this – see [[docs:2500_config_apps:0700_add_edit_attributes:0500_ref_attrib#Presentation_Options_for_References|Presentation Options for References]]).
  
 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 41: Line 42:
 See also: [[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