简体   繁体   English

推进DOMDocument :: schemaValidate():元素“外键”,属性“ ondelete”,“ onupdate”,“ skipsql”该属性不允许吗?

[英]propel DOMDocument::schemaValidate(): Element 'foreign-key', attribute 'ondelete','onupdate','skipsql' The attribute is not allowing?

I am using propel PHP: The foreign key attries are not getting depended on the parent table. 我正在使用propel PHP:外键属性不再依赖于父表。 The Creations, updates, deletes are taken place in parent is not effecting the child table. 创建,更新,删除在父表中进行,并不影响子表。

foreign-key elements like onupdate,ondelete,skipsql is not acceping by the propel and error's like this 像onupdate,ondelete,skipsql这样的外键元素不能被推进,并且错误是这样的

DOMDocument::schemaValidate(): Element 'foreign-key', attribute 'ondelete','onupdate','skipsql' DOMDocument :: schemaValidate():元素“外键”,属性“ ondelete”,“ onupdate”,“ skipsql”

The attribute is not allowing? 该属性不允许吗?

I got it, it's syntax mistake in my xml file. 我知道了,这是我的xml文件中的语法错误。

<table name="names" phpName="Name">
<column name="nameid" phpName="Nid" type="integer" size="11" required="true" primaryKey="true"
autoIncrement="true" description="Name ID"/>
<column name="name" phpName="Name" type="varchar" size="50" required="true"
description="Name"/>
<validator column="name">
<rule name="required" message="Name is Required"/>
<rule name="minLength" value="3" message="Enter Valid Full-Name, Minimum of 3 characters"/>
<rule name="maxLength" value="20" message="Invalid Entry"/>
<rule name="match" value="/^[\w]+$/" message="No Special Character Allowed"/>
<rule name="unique" />
</validator>
</table>

<table name="relations" phpName="Relations">
<column name="rid" type="integer" size="11" required="true" primaryKey="true" autoIncrement="true"
description="Relational ID"/>

<column name="pnid" type="integer" size="11" required="true" description="name User ID"/>

<column name="rnid" type="integer" size="11" required="true" description="name Relationship ID"/>

<column name="relation" type="varchar" size="100" required="true" description="Relationship"/>

<validator column="relation">
<rule name="required" message="Relationship Type is Required" />
<rule name="match" value="/^([\w])+([\.\w\-]+)+$/" message="Enter a Valid String" />
<rule name="minLength" value="3" message="Enter a Valid Relation Ship"/>
<rule name="maxLength" value="20" message="Invalid Entry"/>
</validator>

<foreign-key foreignTable="names" onUpdate="CASCADE" onDelete="CASCADE">
<reference local="pnid" foreign="nid" />
<reference local="rnid" foreign="nid" />
</foreign-key>
</table>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM