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
Replies
2 replies
Answers
1 answer
Subscribers
8 subscribers
Views
2219 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
We have requirement of storing multiple CDTs in one transaction, But id of the t
ajinkyab277
Certified Lead Developer
over 8 years ago
We have requirement of storing multiple CDTs in one transaction, But id of the the cdt1 is foreign key in cdt 2 and id of the cdt2 is foreign is cdt3
e.g
Tables
Permit
-------------
permitId
permitName
PermitStatus
--------------
permitStatusId
permitId
PermitStatusTypeId
PermitStatusState
------------------
permitStatusStateId
permitStatusId
permitStateTypeid
The options I have thought are
1. Create a Nested CDT
Permit
--PermitStatus
--PermitStatusState
Cons:- Nested CDT structure is not recommended as per best practices
2. Use of store procedure
Cons:- Need to maintain extra CDT for store proc, will loose CDT benefits.
Is there any other best way so that i can achieve this.
OriginalPostID-153073
OriginalPostID-153073
Discussion posts and replies are publicly visible
Parents
0
TJ
A Score Level 2
over 6 years ago
Hi Ajinkya, You can try following:
1. Create a composite key for each table with id(current primary key) and another unique column
2. Add unique data to this column
3. Create a trigger/SP to copy id from parent table where unique column value matches.
This should be able to resolve your problem.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
TJ
A Score Level 2
over 6 years ago
Hi Ajinkya, You can try following:
1. Create a composite key for each table with id(current primary key) and another unique column
2. Add unique data to this column
3. Create a trigger/SP to copy id from parent table where unique column value matches.
This should be able to resolve your problem.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data