<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Mimicking ON DELETE NO ACTION / RESTRICT in Active Record</title>
	<atom:link href="http://www.adaruby.com/2007/01/17/mimicking-on-delete-no-action-restrict-in-active-record/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adaruby.com/2007/01/17/mimicking-on-delete-no-action-restrict-in-active-record/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mimicking-on-delete-no-action-restrict-in-active-record</link>
	<description>Rich Dynamic Applications with Ruby on Rails</description>
	<lastBuildDate>Fri, 03 Feb 2012 03:32:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Hendy Irawan</title>
		<link>http://www.adaruby.com/2007/01/17/mimicking-on-delete-no-action-restrict-in-active-record/comment-page-1/#comment-88</link>
		<dc:creator>Hendy Irawan</dc:creator>
		<pubDate>Mon, 22 Jan 2007 05:00:13 +0000</pubDate>
		<guid isPermaLink="false">http://adaruby.com/2007/01/17/mimicking-on-delete-no-action-restrict-in-active-record/#comment-88</guid>
		<description>Dear Ariel,

It&#039;s &quot;almost safe&quot;, in that the &quot;trigger&quot; will be called just before the deletion is performed. So if there isn&#039;t something that goes on the little time lapse between &quot;check&quot; and the deletion operation, then everything is gonna be alright... (I guess)

A safer way would be to put the referential integrity (CONSTRAINT FOREIGN KEY ....) check also in the DBMS. (i.e. PostgreSQL and MySQL 5 supports this.) So even if something goes wrong in the application/Rails layer, the DBMS will catch it. It&#039;s not so &quot;DRY&quot; (Don&#039;t Repeat Yourself) but I think it&#039;s a nice compromise... (and that is what I use)</description>
		<content:encoded><![CDATA[<p>Dear Ariel,</p>
<p>It&#8217;s &#8220;almost safe&#8221;, in that the &#8220;trigger&#8221; will be called just before the deletion is performed. So if there isn&#8217;t something that goes on the little time lapse between &#8220;check&#8221; and the deletion operation, then everything is gonna be alright&#8230; (I guess)</p>
<p>A safer way would be to put the referential integrity (CONSTRAINT FOREIGN KEY &#8230;.) check also in the DBMS. (i.e. PostgreSQL and MySQL 5 supports this.) So even if something goes wrong in the application/Rails layer, the DBMS will catch it. It&#8217;s not so &#8220;DRY&#8221; (Don&#8217;t Repeat Yourself) but I think it&#8217;s a nice compromise&#8230; (and that is what I use)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ariel Meilij</title>
		<link>http://www.adaruby.com/2007/01/17/mimicking-on-delete-no-action-restrict-in-active-record/comment-page-1/#comment-89</link>
		<dc:creator>Ariel Meilij</dc:creator>
		<pubDate>Thu, 18 Jan 2007 16:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://adaruby.com/2007/01/17/mimicking-on-delete-no-action-restrict-in-active-record/#comment-89</guid>
		<description>A nice snipplet of code. I was wondering what could happen with concurrent users on the same record, yet curiosity never made me look for an answer...</description>
		<content:encoded><![CDATA[<p>A nice snipplet of code. I was wondering what could happen with concurrent users on the same record, yet curiosity never made me look for an answer&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

