Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Replicant order field
vivek01sinha
I have nested replicants and I am trying to deploy the data in two separate tables. For first table I want to use path and replicant order as the primary key and for the nested replicant, I want to use path, replicant order of the parent replicant and replicant order of the nested replicant as primary key. How can I access the replicant order of the parent replicant in group for nested replicant. My schema file looks like this:
=======================================================================================
<group name="CMS_Rep" table="$mybasetablenameprefix^__CMS_Rep__$mybasetablenamesuffix" root-group="no">
<attrmap >
<column name="Path" data-type="VARCHAR2(1000)" value-from-field="path"/>
<column name="IW_State" data-type="varchar(255)" value-from-field="state"/>
<column name="id_repOrder" data-type="INTEGER" value-from-field="not-used" replicant-order-column="yes" allows-null="no"/>
<column name="nme_gt_linklabel" data-type="VARCHAR2(255)" value-from-field="serviceRawDetail/0/guidesTutorials/0/link/[0-2]/linkLabel" allows-null="yes" is-url="no" is-replicant="yes"/>
<column name="nme_gt_selectfile" data-type="VARCHAR(255)" value-from-field="serviceRawDetail/0/guidesTutorials/0/link/[0-2]/selectFile" allows-null="yes" is-url="no" is-replicant="yes"/>
</attrmap>
<keys >
<primary-key >
<key-column name="id_repOrder" />
<key-column name="Path" />
</primary-key>
<foreign-key parent-group="CMS" >
<column-pair child-column="Path" parent-column="Path" >
</column-pair>
</foreign-key>
</keys>
</group>
<group name="CMS_RepV" table="$mybasetablenameprefix^__CMS_RepV__$mybasetablenamesuffix" root-group="no">
<attrmap >
<column name="Path" data-type="VARCHAR2(1000)" value-from-field="path"/>
<column name="IW_State" data-type="varchar(255)" value-from-field="state"/>
<column name="id_parentrepOrder" data-type="INTEGER" value-from-field="serviceRawDetail/0/guidesTutorials/0/link/[0-2]/rep_order" replicant-order-column="yes" allows-null="no"/>
<column name="id_repOrder" data-type="INTEGER" value-from-field="not-used" replicant-order-column="yes" allows-null="no"/>
<column name="nme_gt_linklabel" data-type="VARCHAR2(255)" value-from-field="serviceRawDetail/0/guidesTutorials/0/link/[0-2]/link/[0-2]/linkLabel" allows-null="yes" is-url="no" is-replicant="yes"/>
<column name="nme_gt_selectfile" data-type="VARCHAR(255)" value-from-field="serviceRawDetail/0/guidesTutorials/0/link/[0-2]/link/[0-2]/selectFile" allows-null="yes" is-url="no" is-replicant="yes"/>
</attrmap>
<keys >
<primary-key >
<key-column name="id_repOrder" />
<key-column name="id_parentrepOrder" />
<key-column name="Path" />
</primary-key>
<foreign-key parent-group="CMS" >
<column-pair child-column="Path" parent-column="Path" >
</column-pair>
</foreign-key>
<foreign-key parent-group="CMS_Rep" >
<column-pair child-column="id_parentrepOrder" parent-column="id_repOrder" >
</column-pair>
</foreign-key>
</keys>
</group>
==================================================================================================
In the group CMS_RepV, currently I am accessing the replicant order of the parent replicant by putting the xpath of the replicant. The way data is getting saved right now is: if I enter two replicants and two nested replicants for each, then the replicant order in CMS_Rep table gets saved as 1 and 2 which is what I need but for the nested replicant table CMS_RepV, the date is getting saved like this:
parent replicant order replicant order
-------------------------- ------------------
1 1
1 2
1 3
1 4
The way we need it is:
parent replicant order replicant order
-------------------------- ------------------
1 1
1 2
2 1
2 2
I also tried accessing the parent replicant order by something like CMS_Rep.id_repOrder but that also gives the sme result.
Is there a way to acheive what I am trying to? Please let me know if I am missing something.
Find more posts tagged with
Comments
Ottawa_IWOV
did you ever get a resolution to this?