<?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 for Awesomism</title>
	<atom:link href="http://awesomism.co.uk/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://awesomism.co.uk</link>
	<description>Think... Believe... Create... Release!</description>
	<lastBuildDate>Fri, 04 Sep 2009 10:55:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>Comment on Symfony 1.2, Doctrine 1.1 and saving relationships by gunzip</title>
		<link>http://awesomism.co.uk/2009/05/19/symfony-12-doctrine-12-and-saving-relationships/comment-page-1/#comment-5</link>
		<dc:creator>gunzip</dc:creator>
		<pubDate>Fri, 04 Sep 2009 10:55:46 +0000</pubDate>
		<guid isPermaLink="false">http://awesomism.co.uk/?p=20#comment-5</guid>
		<description>if you&#039;re creating a new object the methods link/unlink cannot work like that because you don&#039;t have any &quot;id&quot; to connect to yet (at least with Doctrine &lt; 1.1). You must call the doSave method &lt;b&gt;before&lt;/b&gt; using them:

&lt;code&gt;
   public function doSave($con = null)  
   {  
     parent::doSave($con);  
     $this-&gt;getObject()-&gt;unlink(&#039;FaqGroups&#039;);  
     $this-&gt;getObject()-&gt;link(&#039;FaqGroups&#039;, $this-&gt;getValue(&#039;faq_groups_list&#039;));  
   }  
&lt;/code&gt;

I think this is fixed in Doctrine &gt;= 1.1 because link/unlink methods don&#039;t change the object save() is called. Symfony 1.2 ships with the 1.0 one though.</description>
		<content:encoded><![CDATA[<p>if you&#8217;re creating a new object the methods link/unlink cannot work like that because you don&#8217;t have any &#8220;id&#8221; to connect to yet (at least with Doctrine &lt; 1.1). You must call the doSave method <b>before</b> using them:</p>
<p><code><br />
   public function doSave($con = null)<br />
   {<br />
     parent::doSave($con);<br />
     $this-&gt;getObject()-&gt;unlink('FaqGroups');<br />
     $this-&gt;getObject()-&gt;link('FaqGroups', $this-&gt;getValue('faq_groups_list'));<br />
   }<br />
</code></p>
<p>I think this is fixed in Doctrine &gt;= 1.1 because link/unlink methods don&#8217;t change the object save() is called. Symfony 1.2 ships with the 1.0 one though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Symfony 1.2, Doctrine 1.1 and saving relationships by blt</title>
		<link>http://awesomism.co.uk/2009/05/19/symfony-12-doctrine-12-and-saving-relationships/comment-page-1/#comment-4</link>
		<dc:creator>blt</dc:creator>
		<pubDate>Tue, 02 Jun 2009 14:07:59 +0000</pubDate>
		<guid isPermaLink="false">http://awesomism.co.uk/?p=20#comment-4</guid>
		<description>You might also want to look at my post on &lt;a href=&quot;http://www.brandonturner.net/blog/2009/05/doctrine11-with-symfony12/&quot; rel=&quot;nofollow&quot;&gt;using Doctrine 1.1 with Symfony 1.2&lt;/a&gt;.  Doctrine 1.1 changes a few things relating to how relationships are saved.  If you use Symfony generated forms this can become problematic.</description>
		<content:encoded><![CDATA[<p>You might also want to look at my post on <a href="http://www.brandonturner.net/blog/2009/05/doctrine11-with-symfony12/" rel="nofollow">using Doctrine 1.1 with Symfony 1.2</a>.  Doctrine 1.1 changes a few things relating to how relationships are saved.  If you use Symfony generated forms this can become problematic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

