<?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>Issue with foreign key not updating while using write to data store entity</title><link>https://community.appian.com/discussions/f/process/8244/issue-with-foreign-key-not-updating-while-using-write-to-data-store-entity</link><description>Question : I have a @onetoone xsd that creates 2 cdts(Request, FRM003). In my process model(write to data store entity) it inserts a new record to both tables, but the FRM003 table does not update the foreign key of the requestID which is the primary</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Issue with foreign key not updating while using write to data store entity</title><link>https://community.appian.com/thread/42809?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2017 03:56:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0006f04a-1de6-474f-a570-3451297d6ae9</guid><dc:creator>Ravi Roshan</dc:creator><description>Please have a look in &lt;a href="/search?q=OriginalPostID-261496"&gt;forum.appian.com/.../e-261496&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with foreign key not updating while using write to data store entity</title><link>https://community.appian.com/thread/42808?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2017 03:38:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5410fc0a-ba2f-41b8-9f3a-25d9bf66fb79</guid><dc:creator>Ravi Roshan</dc:creator><description>Hi Anthony, have you got any solution for this because I am facing similar issue.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with foreign key not updating while using write to data store entity</title><link>https://community.appian.com/thread/34665?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2016 21:18:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9d1c2db7-fa68-403a-a834-7fc1e957130e</guid><dc:creator>reginaldm377</dc:creator><description>Define the min/maxOccur for your XSD as well. &lt;br /&gt;&lt;br /&gt;Also, double check the CDT setup to make sure FRM003 CDT references the Request CDT for the requestID&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with foreign key not updating while using write to data store entity</title><link>https://community.appian.com/thread/34663?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2016 21:01:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1abc7f53-8aef-41b1-85b1-176af1d563b4</guid><dc:creator>anthonyc</dc:creator><description>Thanks for the reply,&lt;br /&gt;I believe I have the type specified in the Request.&lt;br /&gt;&amp;lt;xsd:element name=&amp;quot;FRM003&amp;quot; type=&amp;quot;INTEXP_FRM003&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;xsd:annotation&amp;gt;&amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;&lt;br /&gt;          @OneToOne(cascade=ALL, optional=false)&lt;br /&gt;          @JoinColumn(name=&amp;quot;requestID&amp;quot;,insertable=false, updatable=false) &lt;br /&gt;&amp;lt;/xsd:appinfo&amp;gt;&amp;lt;/xsd:annotation&amp;gt;&lt;br /&gt;&amp;lt;/xsd:element&amp;gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with foreign key not updating while using write to data store entity</title><link>https://community.appian.com/thread/34662?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2016 20:44:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b846ac68-9c23-4588-8fdb-d5f00c5dea3a</guid><dc:creator>reginaldm377</dc:creator><description>I think you should use this for reference &lt;br /&gt;&lt;br /&gt;&lt;a href="https://forum.appian.com/suite/help/16.2/Custom_Data_Types_from_XSD.html#Data_Relationship_XSD_Annotation_Examples"&gt;forum.appian.com/.../Custom_Data_Types_from_XSD.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Assuming your CDT setup is already correct, you&amp;#39;ll have to use the JPA annotation @JoinColumn(name = &amp;quot;request_ID&amp;quot;) and specify the type (FRM003) for FRM003&amp;#39;s XSD&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>