<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: CakePHP: HasAndBelongsToMany (HABTM)</title>
	<atom:link href="http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/feed/" rel="self" type="application/rss+xml" />
	<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/</link>
	<description>Tech Travels</description>
	<lastBuildDate>Tue, 03 Nov 2009 02:36:03 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: edivad</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-908</link>
		<dc:creator>edivad</dc:creator>
		<pubDate>Wed, 03 Jun 2009 08:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-908</guid>
		<description>@sam, this post is related to the cakephp 1.0. Now there&#039;s the 1.2, that by the .cpt file, it seems you are using.

Unfortunly I still havent had time to do nothing with cake 1.2. Try asking in the mailing list.</description>
		<content:encoded><![CDATA[<p>@sam, this post is related to the cakephp 1.0. Now there&#8217;s the 1.2, that by the .cpt file, it seems you are using.</p>
<p>Unfortunly I still havent had time to do nothing with cake 1.2. Try asking in the mailing list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-906</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Wed, 03 Jun 2009 00:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-906</guid>
		<description>Hi!
Indeed a very time saving issue here... wow, thx a lot!

i did it also, but i recognized that the relation table is a) not saved and b) exisiting relations are not displayed.

So, i just put the $form-&gt;select-Stmt into the view. I did not change the model classes.

Like that:
echo $form-&gt;select(&#039;Role/Role&#039;,$roles,null,array(&#039;multiple&#039;=&gt;&#039;mu
ltiple&#039;));

(I&#039;ve a table names actions, roles and actions_roles; it&#039;s in file views/actions/edit.ctp)

Any idea what i&#039;ve to change?

Thx, Sam</description>
		<content:encoded><![CDATA[<p>Hi!<br />
Indeed a very time saving issue here&#8230; wow, thx a lot!</p>
<p>i did it also, but i recognized that the relation table is a) not saved and b) exisiting relations are not displayed.</p>
<p>So, i just put the $form-&gt;select-Stmt into the view. I did not change the model classes.</p>
<p>Like that:<br />
echo $form-&gt;select(&#8216;Role/Role&#8217;,$roles,null,array(&#8216;multiple&#8217;=&gt;&#8217;mu<br />
ltiple&#8217;));</p>
<p>(I&#8217;ve a table names actions, roles and actions_roles; it&#8217;s in file views/actions/edit.ctp)</p>
<p>Any idea what i&#8217;ve to change?</p>
<p>Thx, Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-841</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Tue, 30 Dec 2008 00:54:48 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-841</guid>
		<description>Your article was helpful and I don&#039;t know if it changed between versions. But relatedtable/relatedtable as the field name is not quite right.

2 issues, minor one first, new syntax is with period I believe.

Second more important issue, naming the form field this will get the selection to display the tables values in the xref, especially if there is a title field in the corresponding table and you do form-&gt;input. But it&#039;s not the relatedtable name, it&#039;s the related model name. So if you are in the User add view, doing form-&gt;input(&#039;Profile.Profile&#039;) will display it, and the model will recognize and save it. Assuming you did put var $hasAndBelongsToMany = array(&quot;Profile&quot;); in the User model.</description>
		<content:encoded><![CDATA[<p>Your article was helpful and I don&#8217;t know if it changed between versions. But relatedtable/relatedtable as the field name is not quite right.</p>
<p>2 issues, minor one first, new syntax is with period I believe.</p>
<p>Second more important issue, naming the form field this will get the selection to display the tables values in the xref, especially if there is a title field in the corresponding table and you do form-&gt;input. But it&#8217;s not the relatedtable name, it&#8217;s the related model name. So if you are in the User add view, doing form-&gt;input(&#8216;Profile.Profile&#8217;) will display it, and the model will recognize and save it. Assuming you did put var $hasAndBelongsToMany = array(&#8220;Profile&#8221;); in the User model.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: edivad</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-821</link>
		<dc:creator>edivad</dc:creator>
		<pubDate>Wed, 01 Oct 2008 09:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-821</guid>
		<description>@Terri, sorry but without any extract of code I can&#039;t understand
why. You better ask in the &lt;a href=&quot;http://groups.google.com/group/cake-php&quot; rel=&quot;nofollow&quot;&gt;mailing list&lt;/a&gt;
posting some code. There are many people more expert than me :)</description>
		<content:encoded><![CDATA[<p>@Terri, sorry but without any extract of code I can&#8217;t understand<br />
why. You better ask in the <a href="http://groups.google.com/group/cake-php" rel="nofollow">mailing list</a><br />
posting some code. There are many people more expert than me <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terri Ann</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-820</link>
		<dc:creator>Terri Ann</dc:creator>
		<pubDate>Tue, 30 Sep 2008 20:44:51 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-820</guid>
		<description>This was fantastically helpful, thanks!  My only problem is that the data isn&#039;t saving on add or edit.

It displays, and selects correctly but it never saves these associations. Am I missing something.  I&#039;ve never used bake and I am incorperating this into something that&#039;s already been built do I didn&#039;t think that erasing it all to bake would be a good idea either.

*cheers!*</description>
		<content:encoded><![CDATA[<p>This was fantastically helpful, thanks!  My only problem is that the data isn&#8217;t saving on add or edit.</p>
<p>It displays, and selects correctly but it never saves these associations. Am I missing something.  I&#8217;ve never used bake and I am incorperating this into something that&#8217;s already been built do I didn&#8217;t think that erasing it all to bake would be a good idea either.</p>
<p>*cheers!*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matbaa</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-817</link>
		<dc:creator>Matbaa</dc:creator>
		<pubDate>Fri, 12 Sep 2008 11:00:06 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-817</guid>
		<description>Could you explain to save this to database?</description>
		<content:encoded><![CDATA[<p>Could you explain to save this to database?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: edivad</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-799</link>
		<dc:creator>edivad</dc:creator>
		<pubDate>Wed, 25 Jun 2008 10:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-799</guid>
		<description>I don&#039;t remember well but it should be enough to do a $this-&gt;Post-&gt;save(... ) if every relationship has been defined correctly in the Model and the view has been build correctly.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t remember well but it should be enough to do a $this-&gt;Post-&gt;save(&#8230; ) if every relationship has been defined correctly in the Model and the view has been build correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fiqhi</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-798</link>
		<dc:creator>Fiqhi</dc:creator>
		<pubDate>Wed, 25 Jun 2008 10:26:23 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-798</guid>
		<description>Hi, 
I want to know, whether how to save data with HABTM relationship?
I have 3 tables, Posts, Categories, and Categories_Posts. 1 post, can have 2 or more categories.

First, i saved the data to Posts table, to get the last ID.
But, I get confuse when saving data to Categories_Posts.

Can you help me? thx a lot</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I want to know, whether how to save data with HABTM relationship?<br />
I have 3 tables, Posts, Categories, and Categories_Posts. 1 post, can have 2 or more categories.</p>
<p>First, i saved the data to Posts table, to get the last ID.<br />
But, I get confuse when saving data to Categories_Posts.</p>
<p>Can you help me? thx a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-779</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Mon, 12 May 2008 17:57:29 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-779</guid>
		<description>Anyone knows how to &#039;interrelate&#039; instances of the vary same model? As in a way of grouping similar products, for example.
Could I do this by adding $hasAndBelongsToMany = array(&#039;Product&#039;); to my Product model? If yes, what would the relationship table look like, since you can&#039;t have two product_id columns? Another example would be dependencies.</description>
		<content:encoded><![CDATA[<p>Anyone knows how to &#8216;interrelate&#8217; instances of the vary same model? As in a way of grouping similar products, for example.<br />
Could I do this by adding $hasAndBelongsToMany = array(&#8216;Product&#8217;); to my Product model? If yes, what would the relationship table look like, since you can&#8217;t have two product_id columns? Another example would be dependencies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josepzin</title>
		<link>http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-718</link>
		<dc:creator>josepzin</dc:creator>
		<pubDate>Mon, 17 Mar 2008 08:03:41 +0000</pubDate>
		<guid isPermaLink="false">http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/#comment-718</guid>
		<description>Buen artículo! :)

No sabía que se podía hacer: $this-&gt;Modelo1-&gt;Modelo2-&gt;generateList()</description>
		<content:encoded><![CDATA[<p>Buen artículo! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>No sabía que se podía hacer: $this-&gt;Modelo1-&gt;Modelo2-&gt;generateList()</p>
]]></content:encoded>
	</item>
</channel>
</rss>
