コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards
解決済み

Is ok to have 2 primary keys for Recipients?

Avatar

Level 6

I'm adding some fields to the abc:recipients (recipient's extension) schema. 

It currently has 01 PK in the base recipient schema. I need to add an attribute from the extension also as PK.  So both are not a combined PK, rather individual PKs.

Is this ok? 

god_prophet_1-1734545456798.png

This is how I have set the codinterno field as PK:

<key internal="true" name="codinterno_pk">
<keyfield xpath="@codinterno"/>
</key>

 

 

トピック

トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。

1 受け入れられたソリューション

Avatar

正解者
Level 6

My main goal was to have "codinterno" as a unique field.


@ParthaSarathy  suggested doing: 


<dbindex name="myIndex" unique="true">

<keyfield xpath="@myField"/>

</dbindex>

Since it was my main goal to have that as a unique field, Paratha suggestion works for my case.

Thank you both.

元の投稿で解決策を見る

2 返信

Avatar

Community Advisor

Hello @god_prophet  My recommendation would be create only one primary key in Recipient schema. @id field is defined as PK by default. So  I would suggest creating "codinterno" as another attribute.


     Manoj
     Find me on LinkedIn

Avatar

正解者
Level 6

My main goal was to have "codinterno" as a unique field.


@ParthaSarathy  suggested doing: 


<dbindex name="myIndex" unique="true">

<keyfield xpath="@myField"/>

</dbindex>

Since it was my main goal to have that as a unique field, Paratha suggestion works for my case.

Thank you both.