Hi, I am trying to map a composite key from a different CDT to another one

Hi,
I am trying to map a composite key from a different CDT to another one using one unique key inside xsd. How do I do it? Two columns from one cdt form a composite pair and I have another foriegn key coming from that table which defines the relationship. I want to map this foriegn key to that parent table inside CDT. What all JPA annotations should I use to get this behavior. I tried my best looking up online and troubleshooting with various things like @EmbeddedId, @Embeddable,@XmlInverseReference(mappedBy="fk_key")....but none of them parsed through appian cdt parser. Any help would be deeply appreciated.

OriginalPostID-202003

OriginalPostID-202003

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    I have several variants of this subCDT inside the main cdt based on the type....attached is a generalized version of the CDT....based on the column "type" inside "default1" cdt i have different types of environments called uat, prod, commercial, test etc which are of type "default1"....which is the subCDT....I had early attached @Id at the beginning before the @Column....seeing above from sonalk's code the only change I see is attaching @Id after @Column....but I still get that same error i mentioned above...attaching the xsd...

    default1.xsd

Reply
  • Hi,
    I have several variants of this subCDT inside the main cdt based on the type....attached is a generalized version of the CDT....based on the column "type" inside "default1" cdt i have different types of environments called uat, prod, commercial, test etc which are of type "default1"....which is the subCDT....I had early attached @Id at the beginning before the @Column....seeing above from sonalk's code the only change I see is attaching @Id after @Column....but I still get that same error i mentioned above...attaching the xsd...

    default1.xsd

Children
No Data