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
+1
person also asked this
people also asked this
Replies
18 replies
Subscribers
10 subscribers
Views
13752 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi, I am trying to map a composite key from a different CDT to another one
aswinb608
A Score Level 2
over 8 years ago
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
0
ChristineH
Certified Lead Developer
over 8 years ago
You need to map the @ID to a real column in the table or view and it can only map to one column. If your table does not have a unique column, one idea is to create a view that has a viewID column. That column can be a concat of the two columns with a separator in between (as 111 is not the same as 1_11 or 11_1). Then use this column as the @ID.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
ChristineH
Certified Lead Developer
over 8 years ago
You need to map the @ID to a real column in the table or view and it can only map to one column. If your table does not have a unique column, one idea is to create a view that has a viewID column. That column can be a concat of the two columns with a separator in between (as 111 is not the same as 1_11 or 11_1). Then use this column as the @ID.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data