Unable to verify 1 to M foreign key relationship for publishing data store

I am on 17.2 and took DB first approach. I have properly named foreign key relationships on the database.

When I try to create a CDT with an attribute referencing parent CDT, foreign key is properly recognized. However, when I  try publish

the data store, the verification process is failing and downloaded script is looking for creating foreign key columns with names

that do not match our naming convention. It needs to be mentioned that the foreign key column has the same name as that

in the database. Why is the verification process is failing?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    What does your CDT annotation look like? Here is an example mapping of a 1:M that works for me:

    <xsd:element maxOccurs="unbounded" minOccurs="0" name="childTypes" type="tns:Child_Type">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">@OneToMany(cascade=CascadeType.ALL, indexed=false) @JoinColumn(name="CHILD_FK_COL_NAME")</xsd:appinfo>
    </xsd:annotation>
    </xsd:element>

    For this example, the Child_Type table has a FK column named CHILD_FK_COL_NAME that points back to the parent table (the CDT)
Reply
  • 0
    Certified Lead Developer
    What does your CDT annotation look like? Here is an example mapping of a 1:M that works for me:

    <xsd:element maxOccurs="unbounded" minOccurs="0" name="childTypes" type="tns:Child_Type">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">@OneToMany(cascade=CascadeType.ALL, indexed=false) @JoinColumn(name="CHILD_FK_COL_NAME")</xsd:appinfo>
    </xsd:annotation>
    </xsd:element>

    For this example, the Child_Type table has a FK column named CHILD_FK_COL_NAME that points back to the parent table (the CDT)
Children