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
2 replies
Subscribers
7 subscribers
Views
1381 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
I have some doubts regarding the mapping among "DB-> CDT-> Query Rule
mjayaswal
over 10 years ago
I have some doubts regarding the mapping among "DB-> CDT-> Query Rule"
1). Can we map a CDT to existing database table which does not have any primary key defined? (I cannot modify the existing tables and the tables don't have primary keys defined. I tried but it does not allow to map if the Primary Key is not there)
2). Can we map a CDT to SQL function and use it to retrieve the data from function? (I guess we cannot)...
OriginalPostID-124907
OriginalPostID-124907
Discussion posts and replies are publicly visible
0
Tim
Certified Lead Developer
over 10 years ago
1) Yes this is possible, the underlying database table does not need to have a primary key defined at the DB level however you must annotate one column using the @Id jpa annotation. I would hope that the table does have some level of unique-ness so choose the appropriate column for this. If your column does not contain unique data then you will not see the full resultset when using query rules.
2) This may depend on your RDBMS, in Oracle for example you can define function based columns in both tables and views which can be mapped to appian datatypes
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mjayaswal
over 10 years ago
Tim, thanks for your reply.
Problem here is with the tables I need to deal with, these are old tables and unique row is not defined by a single column in the existing tables and I searched, composite primary keys are not supported by Appian 7.6 and older.
it seems that the only option remaining is to have a surrogate key and convince the team to change the tables structure.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel