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
3 replies
Subscribers
6 subscribers
Views
1851 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
We are facing issues in updating a record in MySQL when the CDT has a reference
raghunandanj3904
Certified Senior Developer
over 9 years ago
We are facing issues in updating a record in MySQL when the CDT has a reference of OneToMany foreign key reference. When we update the parent record, it is updating it but for the child CDT it is removing the existing record from DB and adding only the new values passed to it as a new row, without keeping the old records(which are also foreign key references for the same data) which were supposed to be there.
CDT1 - field1, field2, field3, field4(which is a foreign key ref with OneToMany).
Now when we update the CDT1 records, it is removing the existing record of field4 and add the values we currently pass to the CDT of field4.
Also when we pass the field4 data with all existing records, it is reinserting them as new rows still deleting the old ones.
Attached is the parent CDT structure.
SCS_RMA_CUSTOMER_PARTS.xsd
OriginalPostID-195796
OriginalPostID-195796
Discussion posts and replies are publicly visible
Parents
0
Mike Cichy
Appian Employee
over 9 years ago
Check your cascade settings. This behavior is consistent with cascade.ALL. If you remove child rows and add new ones, the old ones will be deleted. See details here:
forum.appian.com/.../Custom_Data_Types_from_XSD.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Mike Cichy
Appian Employee
over 9 years ago
Check your cascade settings. This behavior is consistent with cascade.ALL. If you remove child rows and add new ones, the old ones will be deleted. See details here:
forum.appian.com/.../Custom_Data_Types_from_XSD.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data