<?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: Modelizing HABTM join tables in CakePHP 1.2: with and auto-with models</title>
	<atom:link href="http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/feed/" rel="self" type="application/rss+xml" />
	<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/</link>
	<description>A glimpse at a coder&#039;s troubled mind</description>
	<lastBuildDate>Wed, 30 Jun 2010 11:12:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Hammy</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-591</link>
		<dc:creator>Hammy</dc:creator>
		<pubDate>Fri, 19 Feb 2010 05:42:40 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-591</guid>
		<description>I could kiss you! This has been killing me.</description>
		<content:encoded><![CDATA[<p>I could kiss you! This has been killing me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CChaos [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-135</link>
		<dc:creator>CChaos [Visitor]</dc:creator>
		<pubDate>Fri, 24 Apr 2009 08:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-135</guid>
		<description>FINALLLY someone who actually EXPLAINS what the &#039;with&#039; key is all about.&lt;br /&gt;
&lt;br /&gt;
Being a newb, I was banging my head for the past 5 hours on this. And of course there&#039;s actually as simple of an answer as this.&lt;br /&gt;
&lt;br /&gt;
THANK YOU!
</description>
		<content:encoded><![CDATA[<p>FINALLLY someone who actually EXPLAINS what the &#8216;with&#8217; key is all about.</p>
<p>Being a newb, I was banging my head for the past 5 hours on this. And of course there&#8217;s actually as simple of an answer as this.</p>
<p>THANK YOU!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordi [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-134</link>
		<dc:creator>Jordi [Visitor]</dc:creator>
		<pubDate>Tue, 07 Apr 2009 18:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-134</guid>
		<description>Mariano, you&#039;re the best!&lt;br /&gt;
&lt;br /&gt;
Thanks for making my life easier with your explanation.
</description>
		<content:encoded><![CDATA[<p>Mariano, you&#8217;re the best!</p>
<p>Thanks for making my life easier with your explanation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-133</link>
		<dc:creator>Christian [Visitor]</dc:creator>
		<pubDate>Wed, 04 Feb 2009 17:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-133</guid>
		<description>Mariano, la verdad, excelente como siempre tus posts.&lt;br /&gt;
Ahora, tengo un tema (q antes no pasaba, deje cake un tiempo x un proyecto y volvi para la 1.2), los resultados se agrupan... es decir, si tengo 2 veces linkeado el tag 3, en el result solo me aparece una vez. Si bien en el caso de tags esto es practico, para lo que yo estaba usando el join necesitaba que aparezcan todos. Sabes si esto es configurable? Desde ya gracias si me podes tirar una mano.&lt;br /&gt;
ehm... keep it up bro!
</description>
		<content:encoded><![CDATA[<p>Mariano, la verdad, excelente como siempre tus posts.<br />
Ahora, tengo un tema (q antes no pasaba, deje cake un tiempo x un proyecto y volvi para la 1.2), los resultados se agrupan&#8230; es decir, si tengo 2 veces linkeado el tag 3, en el result solo me aparece una vez. Si bien en el caso de tags esto es practico, para lo que yo estaba usando el join necesitaba que aparezcan todos. Sabes si esto es configurable? Desde ya gracias si me podes tirar una mano.<br />
ehm&#8230; keep it up bro!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: picca [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-132</link>
		<dc:creator>picca [Visitor]</dc:creator>
		<pubDate>Mon, 26 Jan 2009 10:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-132</guid>
		<description>Man, you are totally life saver. At least you saved me hours of typing stupid, redundant code. Thank you.
</description>
		<content:encoded><![CDATA[<p>Man, you are totally life saver. At least you saved me hours of typing stupid, redundant code. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nico.m [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-131</link>
		<dc:creator>nico.m [Visitor]</dc:creator>
		<pubDate>Thu, 15 Jan 2009 15:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-131</guid>
		<description>Good article, I spent hours looking for this.&lt;br /&gt;
&lt;br /&gt;
But now I&#039;ll keep on looking for this same behavior using $this-&gt;paginate()... I have a lot of Posts with the same Tag and don&#039;t want to have enormous pages...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
any suggestion?&lt;br /&gt;
&lt;br /&gt;
</description>
		<content:encoded><![CDATA[<p>Good article, I spent hours looking for this.</p>
<p>But now I&#8217;ll keep on looking for this same behavior using $this->paginate()&#8230; I have a lot of Posts with the same Tag and don&#8217;t want to have enormous pages&#8230;</p>
<p>
any suggestion?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-130</link>
		<dc:creator>Paul [Visitor]</dc:creator>
		<pubDate>Fri, 26 Dec 2008 20:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-130</guid>
		<description>User Model&lt;br /&gt;
var $hasAndBelongsToMany = array(&#039;event&#039;,array(&#039;with&#039;=&gt;&#039;EventsUser&#039;));&lt;br /&gt;
&lt;br /&gt;
Event Model&lt;br /&gt;
var $hasAndBelongsToMany = array(&#039;user&#039;,array(&#039;with&#039;=&gt;&#039;EventsUser&#039;));&lt;br /&gt;
&lt;br /&gt;
Join Model&lt;br /&gt;
class EventsUser extends AppModel {&lt;br /&gt;
var $name = &#039;EventsUser&#039;;&lt;br /&gt;
var $useTable = &quot;events_users&quot;;&lt;br /&gt;
var $belongsTo = array(&#039;Event&#039;, &#039;User&#039;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I keep getting &quot;Table arrays for Model Array&quot; Errors. Whats wrong?
</description>
		<content:encoded><![CDATA[<p>User Model<br />
var $hasAndBelongsToMany = array(&#8216;event&#8217;,array(&#8216;with&#8217;=>&#8217;EventsUser&#8217;));</p>
<p>Event Model<br />
var $hasAndBelongsToMany = array(&#8216;user&#8217;,array(&#8216;with&#8217;=>&#8217;EventsUser&#8217;));</p>
<p>Join Model<br />
class EventsUser extends AppModel {<br />
var $name = &#8216;EventsUser&#8217;;<br />
var $useTable = &#8220;events_users&#8221;;<br />
var $belongsTo = array(&#8216;Event&#8217;, &#8216;User&#8217;);<br />
}</p>
<p>I keep getting &#8220;Table arrays for Model Array&#8221; Errors. Whats wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xumix [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-129</link>
		<dc:creator>xumix [Visitor]</dc:creator>
		<pubDate>Fri, 11 Jul 2008 06:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-129</guid>
		<description>@mariano.iglesias: about saving additional data&lt;br /&gt;
oh, rly it has been discussed? look at the model code and this&lt;br /&gt;
http://groups.google.com/group/cake-php/browse_thread/thread/bf91d27adf090826?tvc=2
</description>
		<content:encoded><![CDATA[<p>@mariano.iglesias: about saving additional data<br />
oh, rly it has been discussed? look at the model code and this<br />
<a href="http://groups.google.com/group/cake-php/browse_thread/thread/bf91d27adf090826?tvc=2" rel="nofollow">http://groups.google.com/group/cake-php/browse_thread/thread/bf91d27adf090826?tvc=2</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paydjo [Visitor]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-128</link>
		<dc:creator>paydjo [Visitor]</dc:creator>
		<pubDate>Mon, 14 Apr 2008 03:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-128</guid>
		<description>&lt;code&gt;SELECT `Article`.`id`, `Article`.`title`, `Article`.`body`, `Article`.`created`, `Article`.`modified` FROM `articles` AS `Article` WHERE 1 = 1;&lt;br /&gt;
&lt;br /&gt;
SELECT `Tag`.`id`, `Tag`.`name`, `Tag`.`created`, `Tag`.`modified`, `ArticlesTag`.`id`, `ArticlesTag`.`article_id`, `ArticlesTag`.`tag_id` FROM `tags` AS `Tag` JOIN `articles_tags` AS `ArticlesTag` ON (`ArticlesTag`.`article_id` IN (1, 5) AND `ArticlesTag`.`tag_id` = `Tag`.`id`)&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
how to change the 2nd query with LEFT JOIN&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;SELECT `Tag`.`id`, `Tag`.`name`, `Tag`.`created`, `Tag`.`modified`, `ArticlesTag`.`id`, `ArticlesTag`.`article_id`, `ArticlesTag`.`tag_id` FROM `tags` AS `Tag` &lt;strong&gt;LEFT JOIN&lt;/strong&gt; `articles_tags` AS `ArticlesTag` ON (`ArticlesTag`.`article_id` IN (1, 5) AND `ArticlesTag`.`tag_id` = `Tag`.`id`)&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p><code>SELECT `Article`.`id`, `Article`.`title`, `Article`.`body`, `Article`.`created`, `Article`.`modified` FROM `articles` AS `Article` WHERE 1 = 1;</p>
<p>SELECT `Tag`.`id`, `Tag`.`name`, `Tag`.`created`, `Tag`.`modified`, `ArticlesTag`.`id`, `ArticlesTag`.`article_id`, `ArticlesTag`.`tag_id` FROM `tags` AS `Tag` JOIN `articles_tags` AS `ArticlesTag` ON (`ArticlesTag`.`article_id` IN (1, 5) AND `ArticlesTag`.`tag_id` = `Tag`.`id`)</code></p>
<p>how to change the 2nd query with LEFT JOIN</p>
<p><code>SELECT `Tag`.`id`, `Tag`.`name`, `Tag`.`created`, `Tag`.`modified`, `ArticlesTag`.`id`, `ArticlesTag`.`article_id`, `ArticlesTag`.`tag_id` FROM `tags` AS `Tag` <strong>LEFT JOIN</strong> `articles_tags` AS `ArticlesTag` ON (`ArticlesTag`.`article_id` IN (1, 5) AND `ArticlesTag`.`tag_id` = `Tag`.`id`)</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mariano.iglesias [Member]</title>
		<link>http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/comment-page-1/#comment-127</link>
		<dc:creator>mariano.iglesias [Member]</dc:creator>
		<pubDate>Sun, 06 Apr 2008 14:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/#comment-127</guid>
		<description>@reality: I trust the Cake core and community, which have been in this for years, more than anyone else to decide what&#039;s cakey and what isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
You are right, I implemented Bindable, because I understand a framework is not about providing solutions for every possible given problem, but to solve 80% of them out of the box, and lay out the playfield for you to easily solve the other 20%. And that&#039;s exactly what CakePHP does.
</description>
		<content:encoded><![CDATA[<p>@reality: I trust the Cake core and community, which have been in this for years, more than anyone else to decide what&#8217;s cakey and what isn&#8217;t.</p>
<p>You are right, I implemented Bindable, because I understand a framework is not about providing solutions for every possible given problem, but to solve 80% of them out of the box, and lay out the playfield for you to easily solve the other 20%. And that&#8217;s exactly what CakePHP does.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk
Database Caching 10/30 queries in 0.054 seconds using disk

Served from: marianoiglesias.com.ar @ 2010-07-30 05:19:15 -->