<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Nested CDT Data Write</title><link>https://community.appian.com/discussions/f/process/18239/nested-cdt-data-write</link><description>Not a question, but an interesting topic I found today that I thought was worth sharing. 
 A problem that took some experimentation to figure out was that Nested CDTs will fail on write if the inner CDT foreign key column has a NOT NULL constraint in</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Nested CDT Data Write</title><link>https://community.appian.com/thread/71765?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2020 14:55:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b14383f-750f-4d89-9e8f-14d88193d522</guid><dc:creator>keviny</dc:creator><description>&lt;p&gt;No we are experimenting with this schema to do a bulk write. So @OneToMany(cascade=CascadeType.ALL)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nested CDT Data Write</title><link>https://community.appian.com/thread/71762?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2020 14:09:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9f6d6e46-66d6-4150-88cb-90c6ca21b394</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Can you clarify what kind of relationship you used and what your Cascade behavior was? Typically if you have a CASCADE=REFRESH behavior, then your nested CDT must already have a primary key that exists in the database for it to work.&lt;/p&gt;
&lt;p&gt;For instance, suppose I have Customer M:1 Region with CASCADE-REFRESH. In this example, you can only use existing regions; you cannot insert a region at the same time you insert customer.&lt;/p&gt;
&lt;p&gt;If I misinterpreted your case, can you provide a bit more information about what you tried?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>