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)
dbschema.cfg - specifying foreign key constraints
deeps79
Hi ,
I am using DAS with user defined schema. In this , In need to define a foreign key constraint on one of the columns which refers to a database table.
The problem I am facing is this;
while defining the foreign key constraint , the parent group can only refer to a group in the schema file. How should I resolve this issue.
My schema file looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<dbschema>
<group name="Metadata" root-group="yes">
<attrmap>
<column name="nme_keywords" data-type="VARCHAR(255)" value-from-field="TeamSite/Metadata/Keywords" allows-null="no" is-url="no"/>
<column name="id_owner" data-type="VARCHAR(255)" value-from-field="TeamSite/Metadata/Owner" allows-null="no" is-url="no"/>
..............................................
</attrmap>
<keys>
<primary-key>
<key-column name="nme_keywords"/>
</primary-key>
<foreign-key parent-group="<<Table name>>">
<column-pair parent-column="id_owner" child-column="id_owner"/>
</foreign-key>
</keys>
</group>
</dbschema>
Regards,
Deepa
Find more posts tagged with
Comments
Migrateduser
You can not refer to a group that is defined in the schema. Sorry this is as designed.
Mariam
Jens
what you can do, if you need that key is to add it executing a sql-statement after the table is created.
--
Jens