<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Foreighn keys when deleting</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Foreighn keys when deleting</description>
  <pubDate>Wed, 29 Jul 2026 17:52:12 -700</pubDate>
  <lastBuildDate>Fri, 01 Apr 2011 13:14:47 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2595</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Foreighn keys when deleting : tj,  1) You will get a self...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10363#10363</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2595<br /><strong>Posted:</strong> 01-Apr-2011 at 1:14pm<br /><br />tj,<DIV>&nbsp;</DIV><DIV>1) You will get a self explanatory error: "<EM>End 'TableCs' on relationship 'NorthwindIBModel.FK_TableBTableC' cannot have operation specified since its multiplicity is '*'. Operations cannot be specified on ends with multiplicity '*'.</EM>" The error occur in both pure EF and DevForce.</DIV><DIV>&nbsp;</DIV><DIV>2) It&nbsp;will update the FK (to <EM><strong>null</strong></EM> if 0..1:* or to<EM>&nbsp;<strong>0</strong></EM> if 1:*) in the child entities. </DIV><DIV>&nbsp;</DIV><DIV>3) Not necessary because it's already done when set to none.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 01 Apr 2011 13:14:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10363#10363</guid>
  </item> 
  <item>
   <title>Foreighn keys when deleting : Well it is me that is the BIG...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10336#10336</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2595<br /><strong>Posted:</strong> 31-Mar-2011 at 3:37am<br /><br />Well it is me that is the BIG BUG here. I don't know how often I have asked my customers to read our online documentation before requesting support. ...Now I have fallen my self into that pit :-(<br>I should have read this first:<br>&nbsp; http://drc.ideablade.com/xwiki/bin/view/Documentation/save-cascaded-deletes<br><br>I only had to set the "End1 OnDelte" to "Cascading" in the accociation, and wolla the problem disapeard. I thouhg EM would set this automtically when reading the database information. But obviously it does not and all those Cascading settings in the database have to be repeated&nbsp; manually in the Associations in the EM.<br><br>However out of curiouisity 3 questions: <br><br>1. What effect would it have to set "End2 OnDelete" to "Cascading"? I realy can't se the use for this or what effect it might cause.<br>2. When "End1 OnDelete" is set to "none" and a parent Entity is deleted, what does the EM try to do with the child Entity?<br>3. The dropdown only has two selections "Cascade" and "None". It would be usefull to have the 3d option "Set to NULL" for for nullable foreighn key fields. Is that possible?<br>]]>
   </description>
   <pubDate>Thu, 31 Mar 2011 03:37:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10336#10336</guid>
  </item> 
  <item>
   <title>Foreighn keys when deleting : Hi tj,  You&amp;#039;re not talking...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10335#10335</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2595<br /><strong>Posted:</strong> 31-Mar-2011 at 3:24am<br /><br />Hi tj,<DIV>&nbsp;</DIV><DIV>You're not talking to yourself. I'm looking into the issue. I could not reproduce the problem so far. </DIV><DIV>My cascading deletes work without any problem. I am, however, running Informix 11.5, but this shouldn't make any difference.</DIV><DIV>I've also seem that you posted additional info in the last hour. </DIV><DIV>Since I can't reproduce it here, please provide a small solution reproducing the issue.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;&nbsp; Silvio</DIV>]]>
   </description>
   <pubDate>Thu, 31 Mar 2011 03:24:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10335#10335</guid>
  </item> 
  <item>
   <title>Foreighn keys when deleting : I did a small mistake in my last...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10334#10334</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2595<br /><strong>Posted:</strong> 31-Mar-2011 at 2:30am<br /><br />I did a small mistake in my last post.&nbsp; In the second () "IsPendingEntityList = false" of course.]]>
   </description>
   <pubDate>Thu, 31 Mar 2011 02:30:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10334#10334</guid>
  </item> 
  <item>
   <title>Foreighn keys when deleting : Well no reply, talking to my self...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10333#10333</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2595<br /><strong>Posted:</strong> 31-Mar-2011 at 2:28am<br /><br />Well no reply, talking to my self here :-)<br>Further investigation lead to that if Parent Entity (TableB) is having IsPendingEntityList = true for the list of child items in TableC everything works as supposed and there is only one record in e.Entities in the manager.Saving event with status Deleted<br><br>But as soon as that list is filled totally (IsPendingEntityList = true) things get wrong and the Entity Model deletes the entity in table B but then tries to modify the child entity in TableC in the same transaction. This is totally wrong and is a BAD BAD BUG.<br>]]>
   </description>
   <pubDate>Thu, 31 Mar 2011 02:28:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10333#10333</guid>
  </item> 
  <item>
   <title>Foreighn keys when deleting : After investigating this a little...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10322#10322</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2595<br /><strong>Posted:</strong> 30-Mar-2011 at 10:08am<br /><br />After investigating this a little better by putting a debugger breakpoint at &nbsp;manager.Saving even handler. I notice this status on the records (e.Entities):<br>record 0: Entity from TableB with Entity state Deleted<br>record 1: Entity from TableC with Entity state Modified<br><br><div>The later one is with unexpected status. Why is that. Actually it should not be thera at all as it has not been modified.</div><div>However it seems to be so as link up property to TableB is "Detatched".</div><div><br></div><div>How can this be avoided?</div>]]>
   </description>
   <pubDate>Wed, 30 Mar 2011 10:08:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10322#10322</guid>
  </item> 
  <item>
   <title>Foreighn keys when deleting : Hi, Using Ideablade 6.0.9.0 and...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10319#10319</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2595<br /><strong>Posted:</strong> 30-Mar-2011 at 8:06am<br /><br />Hi,<br>Using Ideablade 6.0.9.0 and INformix Dynamic Server 11.7<br><br>Let us first define tables for reproducing this problem:<br><br>TableA<br>&nbsp;&nbsp; id_a serial not null privary key<br>&nbsp;&nbsp; name varchar(50) not null<br><br>TableB<br>&nbsp; id_b serial not null primary key<br>&nbsp; id_a int&nbsp;&nbsp; not null // foreighn key to Table A, cascade on delete<br>&nbsp;&nbsp; name varchar(50) not null<br><br>TableC<br>&nbsp; id_c serial not null primary key<br>&nbsp; id_b int&nbsp;&nbsp; not null // foreighn key to Table B cascaed on delete<br>&nbsp;&nbsp; name varchar(50) not null<br><br>Let us say we have linked records in all 3 tables. If I via the EntityModel delete the record in TableA and save the results (by calling manager.SaveChangesAsync()) the records are deleted from table A, B an C as expected as the foreighn keys are "cascade on delete"<br><br>The strange thing is that if I instead delete the record from TableB, I get this error when I try to save:<br><i><font color="#0033ff">Repository persistence operation failed; ERROR &#091;23000&#093; &#091;IBM&#093;&#091;IDS/NT32&#093; Missing key in referenced table for referential constraint (informix.fk_tableC_2_tableB). (-111 ISAM error:&nbsp; no record found.)</font><br>  <br></i>fk_tableC_2_tableB is the foreighn key based on id_b from table C to tabl B.<br><br>What on earth could be causing this?<br>Is the Entity Model doing something else than just:<br>&nbsp; DELETE FROM TableB WHERE id_c = 22;<br>At least if I run such a SQL command from ServerStudio the record is deleted from TableB as well as the linked record in TableC.<br><br><i><br></i><br>]]>
   </description>
   <pubDate>Wed, 30 Mar 2011 08:06:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2595&amp;PID=10319#10319</guid>
  </item> 
 </channel>
</rss>