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
4 replies
Subscribers
6 subscribers
Views
3484 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
For some reason I'm having difficulty annotating a child CDT (one-to-many) s
Chris
over 9 years ago
For some reason I'm having difficulty annotating a child CDT (one-to-many) so that I can override the foreign key column while allowing Appian to automatically populate this field I define with the parent primary key. With the code below, Appian will create the column/name and automatically populate the key once a row is written - however I typically create tables manually and would like to have the SQL structure in place before moving applications across servers. If we use, say, @JoinColumn(name="pId") in the annotation below, the foreign key is preserved but Appian will not automatically populate this field as the row is written to the DB. What am I missing here?
<xsd:element maxOccurs="unbounded" minOccurs="0" name="childCDT" type="tns:childCDT">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@OneToMany(indexed=false)</xsd:appinfo>
</xsd:annotation>
</xsd:element>
OriginalPostID-210220
OriginalPostID-210220
Discussion posts and replies are publicly visible
Parents
0
Chris
over 9 years ago
@sagarl511, thanks for the examples - this led me to the resolution. I had been creating a column mapping in my child CDT for the @JoinColumn, which was preventing Appian from updating the table. Removing the foreign key column from the child CDT allows data to persist, everything is working as expected.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Chris
over 9 years ago
@sagarl511, thanks for the examples - this led me to the resolution. I had been creating a column mapping in my child CDT for the @JoinColumn, which was preventing Appian from updating the table. Removing the foreign key column from the child CDT allows data to persist, everything is working as expected.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data