New Problem with the @JoinTable annotation When I verify the Datastor

New Problem with the @JoinTable annotation

When I verify the Datastore, it gives an error and wants the columns in the join table to be varchar(255) regardless of the columnDefinition.

How do I get the datastore to recognize that it's the right datatype?

OriginalPostID-171438

OriginalPostID-171438

  Discussion posts and replies are publicly visible

Parents
  • Simply create the JoinTable beforehand. Based on my testing with your XSDs it seems that the framework used by Appian can't determine the target data type given the three tables are part of the same DDL.

    What I did to make it work was:

    1. Manually ran

    create table [QPR_SPON_EMPLOYER] (
    [ProgSponNo] char(18) NOT NULL,
    [EmployerID] varchar(100) NOT NULL
    );

    2. Uploaded your XSDs and published the data store. This worked and given this table is created beforehand the only extra parts the DDL runs (besides creating the other two tables) is

    alter table [QPR_SPON_EMPLOYER]
    add constraint qprprgsponsor_employers
    foreign key ([EmployerID])
    references [QPR_EMPLOYER];

    alter table [QPR_SPON_EMPLOYER]
    add constraint FK350AE172A70FFBD4
    foreign key ([ProgSponNo])
    references [QPR_PRG_SPONSOR];

    3. In theory you should be able to provide a columnDefinition inside the JoinColumn but it seems the framework doesn't support this attribute when in use as part of a joinColumns nor inverseJoinColumns
Reply
  • Simply create the JoinTable beforehand. Based on my testing with your XSDs it seems that the framework used by Appian can't determine the target data type given the three tables are part of the same DDL.

    What I did to make it work was:

    1. Manually ran

    create table [QPR_SPON_EMPLOYER] (
    [ProgSponNo] char(18) NOT NULL,
    [EmployerID] varchar(100) NOT NULL
    );

    2. Uploaded your XSDs and published the data store. This worked and given this table is created beforehand the only extra parts the DDL runs (besides creating the other two tables) is

    alter table [QPR_SPON_EMPLOYER]
    add constraint qprprgsponsor_employers
    foreign key ([EmployerID])
    references [QPR_EMPLOYER];

    alter table [QPR_SPON_EMPLOYER]
    add constraint FK350AE172A70FFBD4
    foreign key ([ProgSponNo])
    references [QPR_PRG_SPONSOR];

    3. In theory you should be able to provide a columnDefinition inside the JoinColumn but it seems the framework doesn't support this attribute when in use as part of a joinColumns nor inverseJoinColumns
Children
No Data