<?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: ActiveRecord in PHP</title>
	<atom:link href="http://lukebaker.org/archives/2007/09/24/activerecord-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukebaker.org/archives/2007/09/24/activerecord-in-php/</link>
	<description>lukebaker.org</description>
	<lastBuildDate>Tue, 06 Jul 2010 21:01:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kalle Henriksson</title>
		<link>http://lukebaker.org/archives/2007/09/24/activerecord-in-php/comment-page-1/#comment-21366</link>
		<dc:creator>Kalle Henriksson</dc:creator>
		<pubDate>Mon, 11 May 2009 08:25:10 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/archives/2007/09/24/activerecord-in-php/#comment-21366</guid>
		<description>Thanks a lot! That fixed it...! ;o)</description>
		<content:encoded><![CDATA[<p>Thanks a lot! That fixed it&#8230;! ;o)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://lukebaker.org/archives/2007/09/24/activerecord-in-php/comment-page-1/#comment-21362</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Sun, 10 May 2009 21:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/archives/2007/09/24/activerecord-in-php/#comment-21362</guid>
		<description>Kalle,

You need to first create and save the Productcategory.  Then you can call:

$ps-&gt;productcategories_push($pc);</description>
		<content:encoded><![CDATA[<p>Kalle,</p>
<p>You need to first create and save the Productcategory.  Then you can call:</p>
<p>$ps->productcategories_push($pc);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kalle Henriksson</title>
		<link>http://lukebaker.org/archives/2007/09/24/activerecord-in-php/comment-page-1/#comment-21361</link>
		<dc:creator>Kalle Henriksson</dc:creator>
		<pubDate>Sun, 10 May 2009 21:20:54 +0000</pubDate>
		<guid isPermaLink="false">http://lukebaker.org/archives/2007/09/24/activerecord-in-php/#comment-21361</guid>
		<description>Hi...!

Thanks for sharing your code! A great piece of work. I&#039;ve used Ruby on Rails a bit myself and really missed its ActiveRecord implementation when coding PHP. I&#039;ve got a question about your code. I have a many2many relationship between products and categories via the table products2categories. Which is the correct way of adding a new category and appending it to a products collection of categories updating the table products2categories? It wasn&#039;t as easy as writing...

$ps = Product::find(&#039;first&#039;, array(&#039;conditions&#039; =&gt; &quot;`text` = &#039;Prod1&#039;&quot;));
$ps-&gt;productcategories_push(new Productcategory(array(&#039;text&#039; =&gt; &#039;Cat2&#039;)));

This gave me a HasManyThroughCantAssociateNewRecords exception.

Can you help?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi&#8230;!</p>
<p>Thanks for sharing your code! A great piece of work. I&#8217;ve used Ruby on Rails a bit myself and really missed its ActiveRecord implementation when coding PHP. I&#8217;ve got a question about your code. I have a many2many relationship between products and categories via the table products2categories. Which is the correct way of adding a new category and appending it to a products collection of categories updating the table products2categories? It wasn&#8217;t as easy as writing&#8230;</p>
<p>$ps = Product::find(&#8216;first&#8217;, array(&#8216;conditions&#8217; =&gt; &#8220;`text` = &#8216;Prod1&#8242;&#8221;));<br />
$ps-&gt;productcategories_push(new Productcategory(array(&#8216;text&#8217; =&gt; &#8216;Cat2&#8242;)));</p>
<p>This gave me a HasManyThroughCantAssociateNewRecords exception.</p>
<p>Can you help?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.180 seconds -->
