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
4 replies
Subscribers
7 subscribers
Views
1457 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi, We have this requirement (simplified version): There are 2 tables
senthilar
over 11 years ago
Hi,
We have this requirement (simplified version):
There are 2 tables - Employee, EmployeeTasks. The EmployeeTasks table has a reference to Employee table (employeeId column) and it can have several rows for the same employee. There are columns in EmployeeTasks table which are NON-NULLABLE. Our process produces employee object first and the employee task object would be produced after several hours (or maybe days).
What we need is, we should insert into the Employee table as soon as we have employee object without waiting for employee task object(s). The EmployeeTask can be inserted as and when we get the object populated by our process.
To bring the proper Foreign key constraint between the 2 tables, we added the employeeTask CDT inside the employee CDT. This way the tables get created properly with correct constraints. But, when we try to insert employee (by using Write To DataStore smart service and mapping employeeCDT), we get "cannot insert nu...
OriginalPostID-102760
OriginalPostID-102760
Discussion posts and replies are publicly visible
Parents
0
venkats533
over 11 years ago
did you check best practices for one-to-many relationship and how to define in XSD ? Your use case a typical one-to-many relationship, i.e. every employee has zero or more tasks. Please do not try to put employee under employee task, that is logically reverse in order.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
venkats533
over 11 years ago
did you check best practices for one-to-many relationship and how to define in XSD ? Your use case a typical one-to-many relationship, i.e. every employee has zero or more tasks. Please do not try to put employee under employee task, that is logically reverse in order.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data