Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards
SOLVED

How to set N - 1 (recipient) correctly?

Avatar

Level 6

I've a schema abc:multipleops (that stores all operations - transactions - related to a recipient) that I need to stablish a N-1 relationship with Recipients. The relationship should be visible from both sides.


documentation says, I just should not type: revCardinality

  • revCardinality (optional): with value “single” populates cardinality with type 1-1 (1-N by default)


So, this is what I need to enter to abc:multipleops, so multiple operations are linked to a single recipient???

I'm crossing revCardinality="single"   meaning that I'll remove this part from the code below:


<element integrity="normal" label="Recipient" name="recipient" noDbIndex="true"
revCardinality="single" revLabel="multipleops (Link)" revLink="multipleops"
revTarget="@codinterno" target="nms:recipient" type="link">
<join xpath-dst="@codinterno" xpath-src="@codinterno"/>
</element>

How can I validate it from the interface?

1 Accepted Solution

Avatar

Correct answer by
Level 6

In recipients you don't need to add anything when doing a N-1 to recipients.

Only in the table you want to modify.

Insert after last attribute: 

<element integrity="normal" label="Recipient" name="recipient" noDbIndex="true"
             revIntegrity="normal" revLabel="multipleops (Link)"
             revLink="multipleops" target="nms:recipient" type="link">
      <join xpath-dst="@codinterno" xpath-src="@CODINTERNO"/>
    </element>

 

 

On the other hand, when it is a 1-1 Relationshipd, you need to modify both tables:

On abc:mytable

<element integrity="normal" label="Recipient" name="recipient" noDbIndex="true"
             revCardinality="single" revIntegrity="normal" revLabel="mytable (Link)"
             revLink="mytable" target="nms:recipient" type="link">
      <join xpath-dst="@codinterno" xpath-src="@CODINTERNO"/>
    </element>




on Recipients:

<element externalJoin="true" integrity="normal" label="mytable (Link)"
             name="mytable" noDbIndex="true" revCardinality="single"
             revIntegrity="normal" revLink="recipient" target="abc:mytable"
             type="link">
      <join xpath-dst="@CODINTERNO" xpath-src="@codinterno"/>
    </element>



 

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @god_prophet ,

In abc:multipleop schema, write the below script:

<element integrity="normal" label="Recipient" name="recipient" noDbIndex="true" revLabel="multipleops (Link)" revLink="multipleops" revTarget="@codinterno" target="nms:recipient" type="link">
<join xpath-dst="@codinterno" xpath-src="@codinterno"/>
</element>

Disconnect and reconnect the console.

Open abc:multipleop schemam> structure tab, you can see it is 1 to 1 link with Recipient table and Open Recipient schema > structure tab > display advanced field > you can see 1 to Many link (Orange color icon) created between recipient to multipleop

Avatar

Administrator

Hi @god_prophet

I see that you have another thread with the same content, where a solution has been provided. Can we close this thread based on the solution shared there: https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/how-to-set-a-1-to-...?

Let us know. Thanks!

 

 



Sukrity Wadhwa

Avatar

Level 6

Hi, those are differente... that one was about 1-1 relationship... this one is a 1-N relationship

Avatar

Administrator

Oh yeah, sorry my bad. Thanks for clarifying though!



Sukrity Wadhwa

Avatar

Correct answer by
Level 6

In recipients you don't need to add anything when doing a N-1 to recipients.

Only in the table you want to modify.

Insert after last attribute: 

<element integrity="normal" label="Recipient" name="recipient" noDbIndex="true"
             revIntegrity="normal" revLabel="multipleops (Link)"
             revLink="multipleops" target="nms:recipient" type="link">
      <join xpath-dst="@codinterno" xpath-src="@CODINTERNO"/>
    </element>

 

 

On the other hand, when it is a 1-1 Relationshipd, you need to modify both tables:

On abc:mytable

<element integrity="normal" label="Recipient" name="recipient" noDbIndex="true"
             revCardinality="single" revIntegrity="normal" revLabel="mytable (Link)"
             revLink="mytable" target="nms:recipient" type="link">
      <join xpath-dst="@codinterno" xpath-src="@CODINTERNO"/>
    </element>




on Recipients:

<element externalJoin="true" integrity="normal" label="mytable (Link)"
             name="mytable" noDbIndex="true" revCardinality="single"
             revIntegrity="normal" revLink="recipient" target="abc:mytable"
             type="link">
      <join xpath-dst="@CODINTERNO" xpath-src="@codinterno"/>
    </element>