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
1455 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
Sathya Srinivasan
Appian Employee
over 11 years ago
Couple of things... firstly, make sure you set minOccurs=0 if that is what you want.
Secondly, check what is your CASCADE policy. This can be set via JPA annotation in your XSD.
Hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Sathya Srinivasan
Appian Employee
over 11 years ago
Couple of things... firstly, make sure you set minOccurs=0 if that is what you want.
Secondly, check what is your CASCADE policy. This can be set via JPA annotation in your XSD.
Hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data