Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+2
person also asked this
people also asked this
Replies
16 replies
Answers
4 answers
Subscribers
10 subscribers
Views
16264 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
How do we map a CDT to a database view??/ Any documentation related to vie
raghunandanj3904
Certified Senior Developer
over 11 years ago
How do we map a CDT to a database view??/
Any documentation related to views & CDT is very helpful.
We tried creating a CDT with annotations but it creates a table in the DB. Is there any extra anootations / tags we need to take crae for views. We have created a view in the database in MS SQL....
OriginalPostID-76078
OriginalPostID-76078
Discussion posts and replies are publicly visible
Parents
+1
colton.beck
Appian Employee
over 11 years ago
Hi, Raghu. A couple things.
If the table name is different from the CDT name, add an @Table(name = "<tableName>").
If any CDT field names are different from the table column names, add an @Column(name = "<tableColumnName>").
If one of your CDT fields should be a primary key, add an @Id annotation to that field in the CDT.
If your primary key should be autogenerated, add an @GeneratedValue annotation that that field in the CDT.
Hope this helps!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
Reply
+1
colton.beck
Appian Employee
over 11 years ago
Hi, Raghu. A couple things.
If the table name is different from the CDT name, add an @Table(name = "<tableName>").
If any CDT field names are different from the table column names, add an @Column(name = "<tableColumnName>").
If one of your CDT fields should be a primary key, add an @Id annotation to that field in the CDT.
If your primary key should be autogenerated, add an @GeneratedValue annotation that that field in the CDT.
Hope this helps!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
Children
No Data