Error when creating CDT with two primary keys (MappingException) (APNX-2-4055-000)

Hi,

I´m trying to create a CDT from a view of a table in database. It has two primary keys. It's possible to create it but I cannot publish the data store. I'm getting the following error: "One type assignment annotation is invalid: identifier mapping has wrong number of columns: GdmcdtproyectoGruposDT8668 type: integer (MappingException) (APNX-2-4055-000)".

The generated XSD is:

<xsd:schema xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:tns="urn:com:appian:types" targetNamespace="urn:com:appian:types">
  <xsd:complexType name="gdmcdtproyecto_grupos">
    <xsd:annotation>
      <xsd:appinfo source="appian.jpa">@Table(name="gdmcdtproyecto_grupos")</xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="gdmcdtproyecto_grupos_id" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Id @Column(name="gdmcdtproyecto_grupos_id", nullable=false, columnDefinition="INT") @JoinColumn(name="gdmcdtproyecto_grupos_id")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="elt" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Column(name="elt", columnDefinition="INT")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="gdmcdtproyecto_grupos_idx" nillable="true" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">@Id @Column(name="gdmcdtproyecto_grupos_idx", nullable=false, columnDefinition="INT")</xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>.

 

The creation query for the current table is:

CREATE TABLE `gdmcdtproyecto_grupos` (
  `gdmcdtproyecto_grupos_id` int(11) NOT NULL,
  `elt` int(11) DEFAULT NULL,
  `gdmcdtproyecto_grupos_idx` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `gdmcdtproyecto_grupos`
  ADD PRIMARY KEY (`gdmcdtproyecto_grupos_id`,`gdmcdtproyecto_grupos_idx`),
  ADD KEY `FK95AB9C41838C8ACB` (`gdmcdtproyecto_grupos_id`);

ALTER TABLE `gdmcdtproyecto_grupos`
  ADD CONSTRAINT `FK95AB9C41838C8ACB` FOREIGN KEY (`gdmcdtproyecto_grupos_id`) REFERENCES `gdmcdtproyecto` (`id`);
COMMIT;

What is the possible solution? Thanks

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data