<?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: Key/value tables and how to use them in CakePHP 1.3</title>
	<atom:link href="http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 09:32:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Ross</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-11540</link>
		<dc:creator>Ross</dc:creator>
		<pubDate>Mon, 20 Jun 2011 12:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-11540</guid>
		<description>The above works perfectly for adding, but doesn&#039;t quite work with editing. Here&#039;s my attempt:


	Form-&gt;input(&#039;ContentDetail.0.id&#039;);
		echo $this-&gt;Form-&gt;input(&#039;ContentDetail.0.website&#039;, array(&#039;value&#039;=&gt;$this-&gt;data[&#039;ContentDetail&#039;][0][&#039;value&#039;]));
		echo $this-&gt;Form-&gt;input(&#039;ContentDetail.1.id&#039;);
		echo $this-&gt;Form-&gt;input(&#039;ContentDetail.1.contact_email&#039;, array(&#039;value&#039;=&gt;$this-&gt;data[&#039;ContentDetail&#039;][1][&#039;value&#039;]));
		echo $this-&gt;Form-&gt;input(&#039;ContentDetail.2.id&#039;);
		echo $this-&gt;Form-&gt;input(&#039;ContentDetail.2.contact_phone&#039;, array(&#039;value&#039;=&gt;$this-&gt;data[&#039;ContentDetail&#039;][2][&#039;value&#039;]));
		echo $this-&gt;Form-&gt;input(&#039;ContentDetail.3.id&#039;);
		echo $this-&gt;Form-&gt;input(&#039;ContentDetail.3.address&#039;, array(&#039;type&#039;=&gt;&#039;textarea&#039;, &#039;value&#039;=&gt;$this-&gt;data[&#039;ContentDetail&#039;][3][&#039;value&#039;]));
	?&gt;

But it doesn&#039;t feel very cakey?

ContentDetail is my `UserDetail` table.

This does appear to be work, but again, I don&#039;t think it&#039;s the best approach.

Have I missed something glaringly obvious? Thanks.</description>
		<content:encoded><![CDATA[<p>The above works perfectly for adding, but doesn&#8217;t quite work with editing. Here&#8217;s my attempt:</p>
<p>	Form-&gt;input(&#8216;ContentDetail.0.id&#8217;);<br />
		echo $this-&gt;Form-&gt;input(&#8216;ContentDetail.0.website&#8217;, array(&#8216;value&#8217;=&gt;$this-&gt;data['ContentDetail'][0]['value']));<br />
		echo $this-&gt;Form-&gt;input(&#8216;ContentDetail.1.id&#8217;);<br />
		echo $this-&gt;Form-&gt;input(&#8216;ContentDetail.1.contact_email&#8217;, array(&#8216;value&#8217;=&gt;$this-&gt;data['ContentDetail'][1]['value']));<br />
		echo $this-&gt;Form-&gt;input(&#8216;ContentDetail.2.id&#8217;);<br />
		echo $this-&gt;Form-&gt;input(&#8216;ContentDetail.2.contact_phone&#8217;, array(&#8216;value&#8217;=&gt;$this-&gt;data['ContentDetail'][2]['value']));<br />
		echo $this-&gt;Form-&gt;input(&#8216;ContentDetail.3.id&#8217;);<br />
		echo $this-&gt;Form-&gt;input(&#8216;ContentDetail.3.address&#8217;, array(&#8216;type&#8217;=&gt;&#8217;textarea&#8217;, &#8216;value&#8217;=&gt;$this-&gt;data['ContentDetail'][3]['value']));<br />
	?&gt;</p>
<p>But it doesn&#8217;t feel very cakey?</p>
<p>ContentDetail is my `UserDetail` table.</p>
<p>This does appear to be work, but again, I don&#8217;t think it&#8217;s the best approach.</p>
<p>Have I missed something glaringly obvious? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10645</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Fri, 22 Oct 2010 19:38:09 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10645</guid>
		<description>@chris

There is hardly a simple answer for this, but my recommendation would be to create a view (or a cache of sorts)... which would allow you to query the needed  data.


As mentioned above, EAV or key/value system is not the best approach for intensive read operations, but very flexible for storage.</description>
		<content:encoded><![CDATA[<p>@chris</p>
<p>There is hardly a simple answer for this, but my recommendation would be to create a view (or a cache of sorts)&#8230; which would allow you to query the needed  data.</p>
<p>As mentioned above, EAV or key/value system is not the best approach for intensive read operations, but very flexible for storage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10644</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Fri, 22 Oct 2010 05:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10644</guid>
		<description>I&#039;ve been struggling with this very problem, for a realty website. It would be great if the admin could add new property fields, but of course they&#039;d have to be searched.... I like this technique and plan on using it for site settings, but what other ways are there (that hopefully wouldn&#039;t hurt search capabilities)?

As always tho, excellent article and topic, Please sir, can&#039;t I some more?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been struggling with this very problem, for a realty website. It would be great if the admin could add new property fields, but of course they&#8217;d have to be searched&#8230;. I like this technique and plan on using it for site settings, but what other ways are there (that hopefully wouldn&#8217;t hurt search capabilities)?</p>
<p>As always tho, excellent article and topic, Please sir, can&#8217;t I some more?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10576</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Fri, 10 Sep 2010 13:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10576</guid>
		<description>@vela

Thanks. Good to hear.</description>
		<content:encoded><![CDATA[<p>@vela</p>
<p>Thanks. Good to hear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vela</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10575</link>
		<dc:creator>vela</dc:creator>
		<pubDate>Fri, 10 Sep 2010 10:24:49 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10575</guid>
		<description>whenever I open this blog to look for some decision, I see you just have posted an article about my problem :)))
Thanks! :)</description>
		<content:encoded><![CDATA[<p>whenever I open this blog to look for some decision, I see you just have posted an article about my problem :)))<br />
Thanks! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gabrielr</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10524</link>
		<dc:creator>gabrielr</dc:creator>
		<pubDate>Tue, 17 Aug 2010 01:49:51 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10524</guid>
		<description>Thanks for the answer, I try it ...</description>
		<content:encoded><![CDATA[<p>Thanks for the answer, I try it &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10523</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Tue, 17 Aug 2010 00:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10523</guid>
		<description>@gabrielr 

You need to ensure that you are passing an ID with each record you are editing. Only then an update will be triggered.

I would love to explain in more detail, but that would really take a while.

(I promise to do a follow-up very soon, which will show how to edit existing records for this scenario).</description>
		<content:encoded><![CDATA[<p>@gabrielr </p>
<p>You need to ensure that you are passing an ID with each record you are editing. Only then an update will be triggered.</p>
<p>I would love to explain in more detail, but that would really take a while.</p>
<p>(I promise to do a follow-up very soon, which will show how to edit existing records for this scenario).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gabrielr</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10522</link>
		<dc:creator>gabrielr</dc:creator>
		<pubDate>Mon, 16 Aug 2010 18:31:37 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10522</guid>
		<description>Hi, nice article. But I have a question and I Hope, you help me.

In the case create new record, there is no problem with de method saveAll() and the example, but what happend when I try to edit that records using saveAll(), cakephp Inserts new records in the  Deteail&#039;s Table, not Update that, What Im doing wrong?</description>
		<content:encoded><![CDATA[<p>Hi, nice article. But I have a question and I Hope, you help me.</p>
<p>In the case create new record, there is no problem with de method saveAll() and the example, but what happend when I try to edit that records using saveAll(), cakephp Inserts new records in the  Deteail&#8217;s Table, not Update that, What Im doing wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10466</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Thu, 05 Aug 2010 13:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10466</guid>
		<description>@will  

Thanks for sharing the link.</description>
		<content:encoded><![CDATA[<p>@will  </p>
<p>Thanks for sharing the link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: will</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/07/27/keyvalue-tables-and-how-to-use-them-in-cakephp-1-3/#comment-10464</link>
		<dc:creator>will</dc:creator>
		<pubDate>Thu, 05 Aug 2010 00:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://nuts-and-bolts-of-cakephp.com/?p=1063#comment-10464</guid>
		<description>Hello all,

I used Felix solution for this earlier this year:
http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3

Its pretty handy, but i agree with above comments about reporting / querying etc.  It makes that stuff so much more complicated, you only want to do it for specific usages. 

Eg, when something isn&#039;t going to have to be searched by one of the expanded fields. 

Still, handy to have in the toolkit. 

Will</description>
		<content:encoded><![CDATA[<p>Hello all,</p>
<p>I used Felix solution for this earlier this year:<br />
<a href="http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3">http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3</a></p>
<p>Its pretty handy, but i agree with above comments about reporting / querying etc.  It makes that stuff so much more complicated, you only want to do it for specific usages. </p>
<p>Eg, when something isn&#8217;t going to have to be searched by one of the expanded fields. </p>
<p>Still, handy to have in the toolkit. </p>
<p>Will</p>
]]></content:encoded>
	</item>
</channel>
</rss>

