I am modifying the template crudEdit.jet to include a way to select a parent object without knowing the id, namely a "popup" list of values on which you double click the object's description and it assigns the textbox its id.
Anyways, by now I am able to read the child object's relationships and see if they are one to many or one to one and get the parent object's primary key but I was wondering if there is a way to get the child object's foreign key fields.
Is this possible?
Something like $fieldRelatedType/@primaryKey = 'true' in the example below but rather $dataType/@foreignKey = 'true' or similar...
<jet:iterate select="$dataType/relationships" var="relationship">
<jet:setVariable select="$relationship/targetDataType" var="relatedType" />
<jet:when test="string($relationship/@cardinality) = 'MANY'">
<!-- do nothing -->
<jet:iterate select="$relatedType/fields" var="fieldRelatedType">
<jet:when test="string($fieldRelatedType/@primaryKey) = 'true'">
Thanks for your time!