<?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: New core behavior: Containable</title>
	<atom:link href="http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 16 Mar 2010 17:17:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-130288</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 12 Jun 2009 15:05:05 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-130288</guid>
		<description>@Sebastien: Hm, I have no idea what the problem is. I tried it here with two models, each in its own database, and it worked fine (using the latest CakePHP version from the repository). What happens, if you perform the find without the &quot;contain&quot; option? Does it return any data?</description>
		<content:encoded><![CDATA[<p>@Sebastien: Hm, I have no idea what the problem is. I tried it here with two models, each in its own database, and it worked fine (using the latest CakePHP version from the repository). What happens, if you perform the find without the &#8220;contain&#8221; option? Does it return any data?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastien G.</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-130233</link>
		<dc:creator>Sebastien G.</dc:creator>
		<pubDate>Thu, 11 Jun 2009 14:02:46 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-130233</guid>
		<description>hi thanks I did resolve my problem...

i&#039;m still getting another problem here....
let me explain:

 Im tryin to find a single user in my database. I need to get his country, region and city.

&lt;code&gt;
$this-&gt;User-&gt;Behaviors-&gt;attach(&#039;Containable&#039;);
$user = $this-&gt;User-&gt;find(&#039;first&#039;,array(
			&#039;conditions&#039;=&gt;array(
				&#039;User.id&#039;=&gt;$id,
				&#039;User.activate_account&#039;=&gt;1
			),
			&#039;contain&#039;=&gt; array(&#039;Country&#039;,&#039;Region&#039;,&#039;City&#039;),
));
&lt;/code&gt;

And it gets me an error :
SQL Error: 1054: Unknown column &#039;Country.id&#039; in &#039;field list&#039;

All my relations are made correctly... I think this is because Countries,Regions and Cities are in another database... how can I contain different database in one find method ??</description>
		<content:encoded><![CDATA[<p>hi thanks I did resolve my problem&#8230;</p>
<p>i&#8217;m still getting another problem here&#8230;.<br />
let me explain:</p>
<p> Im tryin to find a single user in my database. I need to get his country, region and city.</p>
<pre><code>$this-&gt;User-&gt;Behaviors-&gt;attach('Containable');
$user = $this-&gt;User-&gt;find('first',array(
			'conditions'=&gt;array(
				'User.id'=&gt;$id,
				'User.activate_account'=&gt;1
			),
			'contain'=&gt; array('Country','Region','City'),
));</code></pre>
<p>And it gets me an error :<br />
SQL Error: 1054: Unknown column &#8216;Country.id&#8217; in &#8216;field list&#8217;</p>
<p>All my relations are made correctly&#8230; I think this is because Countries,Regions and Cities are in another database&#8230; how can I contain different database in one find method ??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-122954</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 13 Mar 2009 15:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-122954</guid>
		<description>@Sebastien: I&#039;m not sure I understood what the problem is. Did you try the following (replace the XXX with what should be &quot;contained&quot;)?
&lt;pre&gt;
&lt;code&gt;
$this-&gt;paginate = array(&#039;YourModel&#039; =&gt; array(&#039;contain&#039; =&gt; array(XXX)));
&lt;/code&gt;
&lt;/pre&gt;
Hope that helps!</description>
		<content:encoded><![CDATA[<p>@Sebastien: I&#8217;m not sure I understood what the problem is. Did you try the following (replace the XXX with what should be &#8220;contained&#8221;)?</p>
<pre>
<code>$this-&gt;paginate = array('YourModel' =&gt; array('contain' =&gt; array(XXX)));</code>
</pre>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastien G.</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-122901</link>
		<dc:creator>Sebastien G.</dc:creator>
		<pubDate>Thu, 12 Mar 2009 14:28:22 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-122901</guid>
		<description>hmmm.... when using the &#039;contain&#039; array in the $paginate variable, how do I attach the &#039;Containable&#039; behavior on the paginated model ?

thks in advance</description>
		<content:encoded><![CDATA[<p>hmmm&#8230;. when using the &#8216;contain&#8217; array in the $paginate variable, how do I attach the &#8216;Containable&#8217; behavior on the paginated model ?</p>
<p>thks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-117152</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 12 Jan 2009 16:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-117152</guid>
		<description>@Han Xu: Yes, the fields option is for the original model whereas the containable behavior is for the associated models.

Hope that helps!</description>
		<content:encoded><![CDATA[<p>@Han Xu: Yes, the fields option is for the original model whereas the containable behavior is for the associated models.</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Han Xu</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-117106</link>
		<dc:creator>Han Xu</dc:creator>
		<pubDate>Sun, 11 Jan 2009 23:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-117106</guid>
		<description>Just wanted to verify something about the containable behavior:

What&#039;s the difference between using containable and simply specifying the fields that you want in the find command?

Since I ran into this problem today, is it because the fields property only applies to the original model that the find is executed on and not the associated model?

Thanks!</description>
		<content:encoded><![CDATA[<p>Just wanted to verify something about the containable behavior:</p>
<p>What&#8217;s the difference between using containable and simply specifying the fields that you want in the find command?</p>
<p>Since I ran into this problem today, is it because the fields property only applies to the original model that the find is executed on and not the associated model?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-110879</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 21 Oct 2008 16:36:57 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-110879</guid>
		<description>@Terr: You are welcome :)</description>
		<content:encoded><![CDATA[<p>@Terr: You are welcome :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terr</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-110651</link>
		<dc:creator>Terr</dc:creator>
		<pubDate>Sun, 19 Oct 2008 11:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-110651</guid>
		<description>Thanks everyone for the clear and concise examples, both in the post and in the comments.</description>
		<content:encoded><![CDATA[<p>Thanks everyone for the clear and concise examples, both in the post and in the comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Promet CakePHP Source&#187; Blog Archive &#187; Learn Containable Behavior by Example</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-106817</link>
		<dc:creator>Promet CakePHP Source&#187; Blog Archive &#187; Learn Containable Behavior by Example</dc:creator>
		<pubDate>Thu, 18 Sep 2008 07:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-106817</guid>
		<description>[...] CakeBaker: New Core Behavior - Containable [...]</description>
		<content:encoded><![CDATA[<p>[...] CakeBaker: New Core Behavior &#8211; Containable [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/comment-page-1/#comment-97825</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 10 Jul 2008 14:49:06 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=604#comment-97825</guid>
		<description>@Elmo: Thanks for your comment! And yes, the Containable behavior is a very useful new feature.</description>
		<content:encoded><![CDATA[<p>@Elmo: Thanks for your comment! And yes, the Containable behavior is a very useful new feature.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
