Sunday, 19 October 2014

GML and nullable Foreign keys



In my xsd Schema exists foreign key who is nullable. When I create GML related to that Schema, Validator says:


Cvc-identity-constraint.4.3: Key 'foreignKey_admKucniBroj_zgrada' With Value 'null' Not Found For Identity Constraint Of Element 'KAT_CadastreFeatureCollection'.. Line '57363', Column '37'.


FK from Schema:



<xsd:keyref name="foreignKey_admKucniBroj_zgrada" refer="fgu:primaryKey_katZgrada">
<xsd:selector xpath=".//fgu:ADM_Kucni_Broj"/>
<xsd:field xpath="fgu:zgrada"/>
</xsd:keyref>


And part of Object's definition:



<xsd:complexType name="ADM_KucniBrojType" final="#all">
<xsd:complexContent>
<xsd:extension base="fgu:KatastarskiGeoObjektType">
<xsd:sequence>
<xsd:element name="zgrada" type="fgu:oidType" nillable="true"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>


Does anyone knows what's hapening, what's wrong?


No comments:

Post a Comment