<?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 : Deleting an Object</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Deleting an Object</description>
  <pubDate>Wed, 29 Apr 2026 15:18:30 -700</pubDate>
  <lastBuildDate>Fri, 06 Feb 2009 08:33:44 -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=1086</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>Deleting an Object : IdeaBlade does not normally automatically...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1086&amp;PID=3885#3885</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 1086<br /><strong>Posted:</strong> 06-Feb-2009 at 8:33am<br /><br />IdeaBlade does not normally automatically delete related entities.&nbsp; For example, if I delete an Order, it is probably incorrect to delete the Customer associated with that Order.&nbsp;Therefore, in most cases, you must&nbsp;delete the related entities yourself. <DIV>&nbsp;</DIV><DIV>&nbsp;There are some exceptions to this rule (see the Intermediate tutorial on "Cascading Deletes").</DIV><span style="font-size:10px"><br /><br />Edited by davidklitzke - 06-Feb-2009 at 8:34am</span>]]>
   </description>
   <pubDate>Fri, 06 Feb 2009 08:33:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1086&amp;PID=3885#3885</guid>
  </item> 
  <item>
   <title>Deleting an Object : I have the following database...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1086&amp;PID=3884#3884</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=443" rel="nofollow">msosa</a><br /><strong>Subject:</strong> 1086<br /><strong>Posted:</strong> 06-Feb-2009 at 6:23am<br /><br />I have the following database structure:<DIV>&nbsp;</DIV><DIV>Table: User</DIV><DIV>Fields: Id, Name, Password, Status</DIV><DIV>&nbsp;</DIV><DIV>Table: Rol</DIV><DIV>Fields: Id, Description</DIV><DIV>&nbsp;</DIV><DIV>Table UserRol</DIV><DIV>Fields: UserId, RolId</DIV><DIV>&nbsp;</DIV><DIV>So, I mapped those tables to devforce objects. Now, I can insert or update the objects and then calling SaveChanges() to the manager, everithing works all right.</DIV><DIV>&nbsp;</DIV><DIV>The problem that I'm facing is that when I want to delete an User object, witch has some roles asigned and call SaveChanges(), the following error arises:</DIV><DIV>&nbsp;</DIV><DIV>Save failed - The statement has been terminated.<BR>The DELETE statement conflicted with the REFERENCE constraint "FK_UsuarioRol_Usuario"</DIV><DIV>&nbsp;</DIV><DIV>The problem, I presume, is that the persistence engine is not deleting the related rows in UsuarioRol table, so when tries to delete the User the constraint error apperars... Is this by desing? What should&nbsp;I do?</DIV><DIV>&nbsp;</DIV><DIV>Thanks.</DIV>]]>
   </description>
   <pubDate>Fri, 06 Feb 2009 06:23:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1086&amp;PID=3884#3884</guid>
  </item> 
 </channel>
</rss>