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)
DataDeploy Key Issue
monk1
I'm having a problem with datadeploy. I'm deploying to two tables Menu and Menu Item. The problem is that I'm referencing a third table Recipe. The table Recipe has the primary key Recipe_Id that I'm referencing from Menu Item. I don't want to deploy anything to Recipe. Is there a way to build a "dummy" <attrmap> for Recipe that won't deploy anything but will keep Menu Item happy? Any help would be deeply appreciated.
Here's the deployment file.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<data-deploy-configuration>
<client>
<deployment name="basearea">
<source>
<xml-source options="wide" area="/default/main/****/templatedata/menus/menu" area-type="ts-filesystem" xml-type="custom">
<path name="data" visit-directory="deep"/>
</xml-source>
</source>
<destinations>
<database update-type="standalone" state-field="state" delete-tracker="yes" enforce-ri="no" real-update="yes">
<dbschema>
<group name="MENU" table="MENU" root-group="yes">
<attrmap>
<column name="MENU_ID" data-type="DECIMAL(22)" value-from-element="menu/0/menuId/0" allows-null="no" is-url="no"/>
<column name="TITLE" data-type="VARCHAR(256)" value-from-element="menu/0/title/0" allows-null="no" is-url="no"/>
<column name="URL_NAME" data-type="VARCHAR(128)" value-from-element="menu/0/title/0" allows-null="no" is-url="no"/>
<column name="SOURCE_ID" data-type="DECIMAL(22)" value-from-element="menu/0/menuId/0" allows-null="no" is-url="no"/>
<column name="MAG_SECTION_ID" data-type="DECIMAL(22)" value-from-element="menu/0/menuId/0" allows-null="no" is-url="no"/>
<column name="INTRO" data-type="VARCHAR(2048)" value-from-element="menu/0/menuIntro/0" allows-null="yes" is-url="no"/>
<column name="DESCRIPTION" data-type="VARCHAR(4000)" value-from-element="menu/0/menuDescription/0" allows-null="yes" is-url="no"/>
<column name="THUMBNAIL_PATH" data-type="VARCHAR(512)" value-from-element="menu/0/thumbnailPath/0" allows-null="yes" is-url="no"/>
<column name="THUMBNAIL_LINK" data-type="VARCHAR(512)" value-from-element="menu/0/thumbnailLinkText/0" allows-null="yes" is-url="no"/>
<column name="MAG_SECTION" data-type="VARCHAR(512)" value-from-element="menu/0/magazineSection/0" allows-null="yes" is-url="no"/>
<column name="SOURCE_MENU_LINK" data-type="VARCHAR(512)" value-from-element="menu/0/sourceMenuLink/0" allows-null="yes" is-url="no"/>
<column name="SHOPPING_LIST" data-type="VARCHAR(2048)" value-from-element="menu/0/shoppingList/0" allows-null="yes" is-url="no"/>
<column name="NUMBER_SERVED" data-type="VARCHAR(512)" value-from-element="menu/0/numberServed/0" allows-null="yes" is-url="no"/>
</attrmap>
<keys>
<primary-key>
<key-column name="MENU_ID"/>
</primary-key>
</keys>
</group>
<group name="MENU_ITEM" table="MENU_ITEM" root-group="no">
<attrmap>
<column name="MENU_ID" data-type="DECIMAL(22)" value-from-element="menu/0/menuId/0" allows-null="no" is-url="no"/>
<column name="RECIPE_ID" data-type="DECIMAL(22)" value-from-element="menu/0/recipeIds/[0-100]/recipeId/0" allows-null="no" is-url="no" is-replicant="yes"/>
</attrmap>
<keys>
<primary-key>
</primary-key>
<foreign-key parent-group="MENU">
<column-pair parent-column="MENU_ID" child-column="MENU_ID"/>
</foreign-key>
<foreign-key parent-group="RECIPE">
<column-pair parent-column="RECIPE_ID" child-column="RECIPE_ID"/>
</foreign-key>
</keys>
</group>
</dbschema>
</database>
</destinations>
</deployment>
</client>
</data-deploy-configuration>
Find more posts tagged with
Comments
monk1
A little more info. I removed from the above deployment
<foreign-key parent-group="RECIPE">
<column-pair parent-column="RECIPE_ID" child-column="RECIPE_ID"/>
</foreign-key>
When I run the deployment again I get another error:
ERROR:No primary keys defined for group [MENU_ITEM].
The table that MENU_ITEM refers to doesn't have a primary key.
This may all be a little loopy as it's been a long day. Thanks again for any guidance.
TS 6.1, DD 5.6, Solaris.
Michael