<?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: Symfony Forms Framework: Merge 2 forms</title>
	<atom:link href="http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/</link>
	<description>DEVelopment EXPerience, shared with the world!</description>
	<lastBuildDate>Thu, 06 Oct 2011 09:32:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jerry</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-7165</link>
		<dc:creator>Jerry</dc:creator>
		<pubDate>Tue, 12 Jul 2011 13:33:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-7165</guid>
		<description>Good example...but i get an error and after fooling around with   it.

For some reason when returning this:
return $this-&gt;object-&gt;getUserInfo();

It can&#039;t access the isNew() method and the fromArray(). But if I do return a new object for example : return new UserInfo() then it works.

Any clue? I am on symfony 1.4!</description>
		<content:encoded><![CDATA[<p>Good example&#8230;but i get an error and after fooling around with   it.</p>
<p>For some reason when returning this:<br />
return $this-&gt;object-&gt;getUserInfo();</p>
<p>It can&#8217;t access the isNew() method and the fromArray(). But if I do return a new object for example : return new UserInfo() then it works.</p>
<p>Any clue? I am on symfony 1.4!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dagger</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-7158</link>
		<dc:creator>Dagger</dc:creator>
		<pubDate>Thu, 21 Apr 2011 14:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-7158</guid>
		<description>for search &amp; join acceleration and better indexing - it is created by our mysql member - says its good to have a dedicated id field.</description>
		<content:encoded><![CDATA[<p>for search &amp; join acceleration and better indexing &#8211; it is created by our mysql member &#8211; says its good to have a dedicated id field.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Van de Voorde Toni</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-7157</link>
		<dc:creator>Van de Voorde Toni</dc:creator>
		<pubDate>Thu, 21 Apr 2011 13:45:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-7157</guid>
		<description>Just to know, why did you use id in userinfo? And why is this id auto incremented? It shouldn&#039;t be auto increment because it has a constraint with the user table.</description>
		<content:encoded><![CDATA[<p>Just to know, why did you use id in userinfo? And why is this id auto incremented? It shouldn&#8217;t be auto increment because it has a constraint with the user table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dagger</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-7156</link>
		<dc:creator>Dagger</dc:creator>
		<pubDate>Thu, 21 Apr 2011 13:28:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-7156</guid>
		<description>the code is identical to the above - the only difference is that UserInfo also has a primary-key auto-generated id same as User. 

it works for new - coz at that time both the forms don&#039;t have any value for id - so it works and saves the values properly.

but when the form is rendered in edit - there is a hidden field id with value, and since the mergeForm has the same name field it is not rendered coz it would be identical and create conflict ... now when i save the form - this one hidden id is used for both the forms - since the id rendered was the User object id, and not UserInfo - the invalid id error is thrown and the form is invalidated. 

I think it will work if i remove the id column from UserInfo - was thinking if there is something on code level i can do to prevent this.</description>
		<content:encoded><![CDATA[<p>the code is identical to the above &#8211; the only difference is that UserInfo also has a primary-key auto-generated id same as User. </p>
<p>it works for new &#8211; coz at that time both the forms don&#8217;t have any value for id &#8211; so it works and saves the values properly.</p>
<p>but when the form is rendered in edit &#8211; there is a hidden field id with value, and since the mergeForm has the same name field it is not rendered coz it would be identical and create conflict &#8230; now when i save the form &#8211; this one hidden id is used for both the forms &#8211; since the id rendered was the User object id, and not UserInfo &#8211; the invalid id error is thrown and the form is invalidated. </p>
<p>I think it will work if i remove the id column from UserInfo &#8211; was thinking if there is something on code level i can do to prevent this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Van de Voorde Toni</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-7155</link>
		<dc:creator>Van de Voorde Toni</dc:creator>
		<pubDate>Thu, 21 Apr 2011 13:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-7155</guid>
		<description>Hello Dagger,

I can&#039;t give you a solution without the code, but I think when you merge forms the fields may not have the same name. You could then use embed form.

But it is strange that it works for the creation but not for the update :s

T</description>
		<content:encoded><![CDATA[<p>Hello Dagger,</p>
<p>I can&#8217;t give you a solution without the code, but I think when you merge forms the fields may not have the same name. You could then use embed form.</p>
<p>But it is strange that it works for the creation but not for the update :s</p>
<p>T</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dagger</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-7154</link>
		<dc:creator>Dagger</dc:creator>
		<pubDate>Thu, 21 Apr 2011 12:43:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-7154</guid>
		<description>Hi,

Very nice tutorial, I&#039;m still using sf1.2 and have &quot;implemented&quot; the above code. 

The only difference between the code above is that in both my forms i have a field Id - when i create a new user - every thing works fine, but when i edit the same user - i get id: invalid userinfo id - error.

How can i resolve the conflict of user table id being used in userinfo table?

thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Very nice tutorial, I&#8217;m still using sf1.2 and have &#8220;implemented&#8221; the above code. </p>
<p>The only difference between the code above is that in both my forms i have a field Id &#8211; when i create a new user &#8211; every thing works fine, but when i edit the same user &#8211; i get id: invalid userinfo id &#8211; error.</p>
<p>How can i resolve the conflict of user table id being used in userinfo table?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Freundt</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-5210</link>
		<dc:creator>Christoph Freundt</dc:creator>
		<pubDate>Thu, 21 Oct 2010 23:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-5210</guid>
		<description>Hi Eby,
In symfony 1.4/Doctrine i used the following code:
public function configure() {
        $this-&gt;mergeForm(new TicketHasFileForm(Doctrine::getTable(&#039;TicketHasFile&#039;)-&gt;find($this-&gt;getObject()-&gt;getId())));
    }

If you would like to know more about it:
http://redotheweb.com/2008/07/08/comparing-propel-doctrine-and-sfpropelfinder/

@Toni
Thank you, you made my day</description>
		<content:encoded><![CDATA[<p>Hi Eby,<br />
In symfony 1.4/Doctrine i used the following code:<br />
public function configure() {<br />
        $this-&gt;mergeForm(new TicketHasFileForm(Doctrine::getTable(&#8216;TicketHasFile&#8217;)-&gt;find($this-&gt;getObject()-&gt;getId())));<br />
    }</p>
<p>If you would like to know more about it:<br />
<a href="http://redotheweb.com/2008/07/08/comparing-propel-doctrine-and-sfpropelfinder/" rel="nofollow">http://redotheweb.com/2008/07/08/comparing-propel-doctrine-and-sfpropelfinder/</a></p>
<p>@Toni<br />
Thank you, you made my day</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: belgacem.tlili</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-5190</link>
		<dc:creator>belgacem.tlili</dc:creator>
		<pubDate>Wed, 20 Oct 2010 08:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-5190</guid>
		<description>retrieveByPk does not work with doctrine

however you ca use embed form function , it&#039;s simply
look to this exemple
http://tech.cibul.org/embedded-forms-with-symfony-1-4-and-jquery/</description>
		<content:encoded><![CDATA[<p>retrieveByPk does not work with doctrine</p>
<p>however you ca use embed form function , it&#8217;s simply<br />
look to this exemple<br />
<a href="http://tech.cibul.org/embedded-forms-with-symfony-1-4-and-jquery/" rel="nofollow">http://tech.cibul.org/embedded-forms-with-symfony-1-4-and-jquery/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Van de Voorde Toni</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-4906</link>
		<dc:creator>Van de Voorde Toni</dc:creator>
		<pubDate>Mon, 06 Sep 2010 10:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-4906</guid>
		<description>Hi Eby,

It should work in symfony 1.4, but never tested the same code with doctrine. Therefore I cannot know for sure if the &quot;retrieveByPk&quot; method exists for Doctrine generated Base Classes.</description>
		<content:encoded><![CDATA[<p>Hi Eby,</p>
<p>It should work in symfony 1.4, but never tested the same code with doctrine. Therefore I cannot know for sure if the &#8220;retrieveByPk&#8221; method exists for Doctrine generated Base Classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eby</title>
		<link>http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/comment-page-1/#comment-4902</link>
		<dc:creator>Eby</dc:creator>
		<pubDate>Mon, 06 Sep 2010 09:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=462#comment-4902</guid>
		<description>Hi Toni
how to work it out in symfony 1.4 + doctrine. Also where we will get UserInfoPeer::retrieveByPK method</description>
		<content:encoded><![CDATA[<p>Hi Toni<br />
how to work it out in symfony 1.4 + doctrine. Also where we will get UserInfoPeer::retrieveByPK method</p>
]]></content:encoded>
	</item>
</channel>
</rss>

