Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
7 subscribers
Views
1796 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
New Problem with the @JoinTable annotation When I verify the Datastor
nickh647
over 8 years ago
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
0
Eduardo Fuentes
Appian Employee
over 8 years ago
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
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Eduardo Fuentes
Appian Employee
over 8 years ago
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
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data