<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Connecting the dots... &#187; Symfony</title>
	<atom:link href="http://blog.rajatpandit.com/tag/symfony/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rajatpandit.com</link>
	<description>Thoughts on Web Development, Infrastructure and Application Scalability</description>
	<lastBuildDate>Thu, 29 Dec 2011 13:21:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Ordering List of Items &#8211; Doctrine / Symfony 1.4</title>
		<link>http://blog.rajatpandit.com/2010/03/27/ordering-list-of-items-doctrine-symfony-1-4/</link>
		<comments>http://blog.rajatpandit.com/2010/03/27/ordering-list-of-items-doctrine-symfony-1-4/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 09:10:44 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=464</guid>
		<description><![CDATA[Recently I had a requirement to write an interface that allows users to change order of elements and move them up and down. I would an interesting cookbook entry on...]]></description>
			<content:encoded><![CDATA[<p>Recently I had a requirement to write an interface that allows users to change order of elements and move them up and down. I would an interesting <a href="http://www.symfony-project.org/cookbook/1_0/en/sortable">cookbook entry on </a><a href="http://symfony-project.org">symfony</a>&#8216;s website but it used <a href="http://propel.phpdb.org/">propel</a> as an ORM. Since my project uses doctrine, I had to implement the same in doctrine. Documenting this here so that someone else might find it useful.</p>
<p>So this is what we want to achieve.</p>
<div id="attachment_466" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.rajatpandit.com/wp-content/uploads/2010/03/sort-screenshot.png"><img class="size-medium wp-image-466" title="sort-screenshot" src="http://blog.rajatpandit.com/wp-content/uploads/2010/03/sort-screenshot-300x188.png" alt="" width="300" height="188" /></a><p class="wp-caption-text">Example of Changing order for elements</p></div>
<p>So first things first, let me define the schema that I am was using:</p>
<pre class="brush: bash; title: ; notranslate">
ReportXReportModule:
  columns:
    id:                                 { type: integer(4), notnull: true, primary: true, autoincrement: true}
    report_id:                      { type: integer(4), notnull: true}
    report_module_id:         { type: integer(4), notnull: true}
    module_order:               { type: integer(2), notnull: true}
</pre>
<p>The <code>module_order</code> is the field to be used to store the order of the module. So here&#8217;s adding a bunch of methods in the model class. So the requirement for this task is that the entry is also to be identified by the report. So in case you need to use these methods, you would have to adapt it to your requirement.<br />
New methods in <code>ReportXReportModuleTable.class.php</code><br />
Fetch a report by Report ID and Order </p>
<pre class="brush: php; title: ; notranslate">
  public static function getByReportAndOrder($report_id, $module_order)
  {
    $data = Doctrine_Query::create()
          -&gt;from('ReportXReportModule rrm')
          -&gt;where('rrm.report_id = ?', $report_id)
          -&gt;andWhere('rrm.module_order = ?', $module_order)
          -&gt;fetchOne();
    if (!$data) {
      return false;
    }
    // send this back if this a sensible record
    return $data;
  }
</pre>
<p>For the given report find the highest value of order</p>
<pre class="brush: php; title: ; notranslate">
  public static function getMaxOrderByReport($report_id)
  {
    $order = 0;
    if (!is_numeric($report_id)) {
      return $order;
    }
    $record = Doctrine_Query::create()
                -&gt;select('MAX(rrm.module_order)')
                -&gt;from('ReportXReportModule rrm')
                -&gt;where('rrm.report_id = ?', $report_id)
                -&gt;fetchArray();

    if (count($record) != 1) {
      return $order;
    } else {
      if (isset($record[0]['MAX'])) {
        $order = $record[0]['MAX'];
      }
    }

    return $order;
  }
</pre>
<p>New methods in <code>ReportXReportModuleTable.class.php.<br />
</code></p>
<p>Get all the records for a given report ID and return them sorted by their order (ranking)</p>
<pre class="brush: php; title: ; notranslate">
  public static function getModulesByReport($report_id)
  {
    $records = array();
    if (!is_numeric($report_id)) {
      return $records;
    }
    $records = Doctrine_Query::create()
                -&gt;from('ReportXReportModule rrm')
                -&gt;where('rrm.report_id = ?', $report_id)
                -&gt;leftJoin('rrm.ReportModule rm')
                -&gt;orderBy('rrm.module_order asc')
                -&gt;fetchArray();
    return $records;
  }
</pre>
<p>This is an interesting method, this is used to swap a record with another record. You shall see how this method is useful for the up and down actions that will follow shortly. This is also done within a transaction to ensure that the integrity of the order for modules is retained.</p>
<pre class="brush: php; title: ; notranslate">
  public function swapWith($module)
  {
    $conn = Doctrine_Manager::connection();
    try {
      $conn-&gt;beginTransaction();
        $order = $this-&gt;getModuleOrder();
        $this-&gt;setModuleOrder($module-&gt;getModuleOrder());
        $this-&gt;save();
        $module-&gt;setModuleOrder($order);
        $module-&gt;save();
      $conn-&gt;commit();
    } catch (Doctrin_Exception $e) {
      $conn-&gt;rollback();
    }
  }
</pre>
<p>This method is useful to delete a module. This not only just deletes the entry but also updates the order of the reset of the modules with a order higher than the current module.</p>
<pre class="brush: php; title: ; notranslate">
  public function deleteByReport($report_id)
  {
    $conn = Doctrine_Manager::connection();
    try {
      $conn-&gt;beginTransaction();
      // decrease all the orders by 1 for all elements that have a rank greater than this rank
      // execute custom sql to do that
      $q = Doctrine_Query::create()
            -&gt;update('ReportXReportModule rrm')
            -&gt;set('rrm.module_order','rrm.module_order - 1' )
            -&gt;where('rrm.module_order &gt; ?', $this-&gt;module_order)
            -&gt;execute();

      $this-&gt;delete();
      $conn-&gt;commit();

    } catch(Doctrin_Exception $e) {
      $conn-&gt;rollback();
    }
  }
</pre>
<p>Now that we have all the required  methods in our model classes, its time to write the first action that will display all the modules. So the code snippet from the action is:</p>
<pre class="brush: php; title: ; notranslate">
  public function executeIndex(sfWebRequest $request)
  {
    // get the list of all the modules
    $this-&gt;report_modules = ReportXReportModuleTable::getModulesByReport($this-&gt;current_report-&gt;getId());
    $this-&gt;max_order      = ReportXReportModuleTable::getMaxOrderByReport($this-&gt;current_report-&gt;getId());
    }
</pre>
<p>and the corresponding template for that is:</p>
<pre class="brush: php; title: ; notranslate">
&lt;h2&gt;List Of Current Modules&lt;/h2&gt;
&lt;?php if (count($report_modules)&gt; 0) : ?&gt;
  &lt;ol class=&quot;report-modules&quot;&gt;
  &lt;?php foreach($report_modules as $module): ?&gt;
    &lt;li&gt;
      &lt;div class=&quot;name&quot;&gt;
        &lt;?= $module['ReportModule']['name']?&gt;
      &lt;/div&gt;
      &lt;div class=&quot;order&quot;&gt;
        &lt;?php if ($module['module_order'] &gt; 0) : ?&gt;
          &lt;?= link_to('Up', 'reportmodulemanager/up?id=' . $module['id'])?&gt;
        &lt;?php endif;?&gt;

        &lt;?php if ($module['module_order'] != $max_order) : ?&gt;
          &lt;?= link_to('Down', 'reportmodulemanager/down?id=' . $module['id'])?&gt;
        &lt;?php endif;?&gt;
      &lt;/div&gt;
      &lt;div class=&quot;action&quot;&gt;
        &lt;?php if (1 == $module['ReportModule']['require_local_configuration']) : ?&gt;
          &lt;?= link_to('Configure', 'reportmodulemanager/configure?id=' . $module['id'])?&gt;
        &lt;?php endif;?&gt;
        &lt;?= link_to('Remove', 'reportmodulemanager/delete?id=' . $module['id'])?&gt;
      &lt;/div&gt;

    &lt;/li&gt;
  &lt;?php endforeach;?&gt;
  &lt;/ol&gt;
&lt;?php endif?&gt;
</pre>
<p>As you can see each module has an <code>up</code> option only when its <code>order</code> is greater than 0. Similarly the module has a <code>down</code> option only when its order is not the same as the highest value for <code>order</code></p>
<p>Now tying in the up and down actions. </p>
<pre class="brush: php; title: ; notranslate">
  public function executeUp(sfWebRequest $request)
  {
    $reportmodule = Doctrine::getTable('ReportXReportModule');
    $item = $reportmodule-&gt;find($request-&gt;getParameter('id'));
    $this-&gt;forward404Unless($item);

    $previous_item = ReportXReportModuleTable::getByReportAndOrder(
        $this-&gt;current_report-&gt;getId(),
        ($item-&gt;getModuleOrder() - 1)
      );
    $this-&gt;forward404Unless($previous_item);

    $item-&gt;swapWith($previous_item);
    $this-&gt;redirect('reportmodulemanager/index');
  }
</pre>
<p>and the for the <code>down</code> action:</p>
<pre class="brush: php; title: ; notranslate">
public function executeDown(sfWebRequest $request)
  {
    $reportmodule = Doctrine::getTable('ReportXReportModule');
    $item = $reportmodule-&gt;find($request-&gt;getParameter('id'));
    $this-&gt;forward404Unless($item);

    $next_item = ReportXReportModuleTable::getByReportAndOrder(
        $this-&gt;current_report-&gt;getId(),
        ($item-&gt;getModuleOrder() + 1)
      );
    $this-&gt;forward404Unless($next_item);

    $item-&gt;swapWith($next_item);
    $this-&gt;redirect('reportmodulemanager/index');
  }
 </pre>
<p>As you can see we swap a module with one after it for the Up action, similarly we swap a module with one after it for the down action.</p>
<p>And that&#8217;s pretty much it to have a list that can be sorted. The other interesting actions would be when you add a new record or remove on. At this point you  must have figured out that adding a new record should be pretty straight forward as you have now methods to access the <code>highest rank</code> using the method <code>ReportXReportModuleTable::getMaxOrderByReport</code></p>
<p>As a part of this post, one day I shall add how to progressively enhance so give it a fancy drag and drop interface as suggested in the original article. However if you have any questions or suggestions to make this better, please feel free to leave a note below.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2010/03/27/ordering-list-of-items-doctrine-symfony-1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating model independent form</title>
		<link>http://blog.rajatpandit.com/2010/03/23/creating-model-independent-form/</link>
		<comments>http://blog.rajatpandit.com/2010/03/23/creating-model-independent-form/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 09:25:15 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[BaseForm]]></category>
		<category><![CDATA[csrf]]></category>
		<category><![CDATA[custom forms]]></category>
		<category><![CDATA[sfValidator]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=450</guid>
		<description><![CDATA[Recently I had to create a basic form which had a bunch of fields. I didn&#8217;t want the form to be model aware and didn&#8217;t want it to work save...]]></description>
			<content:encoded><![CDATA[<p>Recently I had to create a basic form which had a bunch of fields. I didn&#8217;t want the form to be model aware and didn&#8217;t want it to work save information for me in the database. All I wanted was something that would allow me to do the following:</p>
<ol>
<li><a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">CSRF</a> Protection</li>
<li>Take advantage of symfony validation</li>
<li>Work in the same consistent manner as the rest of the form classes</li>
</ol>
<p>This is what I came up with. Create a custom form class that extends <code>BaseForm</code>. Override the configure function to define the custom fields and validations</p>
<pre class="brush: php; title: ; notranslate">
class ProviderInfoReportForm extends BaseForm
{
  public function configure()
  {
    $this-&gt;setWidgets(array(
          'name' =&gt; new sfWidgetFormInputText()
        )
      );
    $this-&gt;validatorSchema['name'] = new sfValidatorString(
      array(
          'max_length' =&gt; 100,
          'required' =&gt; true
        ),
      array(
          'required' =&gt; 'last name required'
        )
    );

    $this-&gt;widgetSchema-&gt;setNameFormat('provider_info_report[%s]');
    $this-&gt;errorSchema = new sfValidatorErrorSchema($this-&gt;validatorSchema);
    parent::setup();
  }
}
</pre>
<p>and then access the form inside the template the regular way.</p>
<pre class="brush: php; title: ; notranslate">
      &lt;form action=&quot;&lt;?= url_for('@report_provider_profile_report')?&gt;&quot; method=&quot;post&quot; accept-charset=&quot;utf-8&quot;&gt;
        &lt;?= $form-&gt;renderGlobalErrors() ?&gt;
        &lt;?= $form-&gt;renderHiddenFields() ?&gt;
        &lt;?php echo $form['name']-&gt;renderError() ?&gt;
        &lt;?php echo $form['name']-&gt;renderLabel() ?&gt;
     &lt;/form&gt;
</pre>
<p>ensure that the <code>renderHiddenFields()</code> call is in place otherwise you would end up getting <code>csrf_token required</code> all over the place. </p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2010/03/23/creating-model-independent-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using sfValidatorCallback</title>
		<link>http://blog.rajatpandit.com/2010/01/01/using-sfvalidatorcallback/</link>
		<comments>http://blog.rajatpandit.com/2010/01/01/using-sfvalidatorcallback/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 13:22:42 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[sfCallbackValidator]]></category>
		<category><![CDATA[sfForm]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[validator]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=442</guid>
		<description><![CDATA[Writing this post down as a note to self about using sfValidatorCallback. Step 1: add the sfValidatorCallback to the widget As you can see form the code, I have commented...]]></description>
			<content:encoded><![CDATA[<p>Writing this post down as a note to self about using  sfValidatorCallback.<br />
Step 1: add the sfValidatorCallback to the widget</p>
<pre class="brush: php; title: ; notranslate">
public function configure()
{
  $this-&gt;widgetSchema['my_field'] =
    new sfWidgetFormTextArea(array('required' =&gt; false));
  // add the validator
  $this-&gt;validatorSchema['my_field']   = new sfValidatorCallback(
      array('callback' =&gt; array(
          array($this, 'my_valdiation_function')   // if you write the function in the validator itself
          // array($this-&gt;getObject(), 'my_valdiation_function')   // or if you move it to your model object
        ))
    );
}
</pre>
<p>As you can see form the code, I have commented out a line, that&#8217;s if you think its a good idea to move the validator to the model. I am not sure if I buy that idea but this what I have seen some developers do. I guess it kinda depends on what they are after, I would rather keep it all together unless it has its value in being shared across other classes.</p>
<p>And finally the signature for actual callback function:</p>
<pre class="brush: php; title: ; notranslate">
public function my_valdiation_function($validator, $value) {
  if ($condition_is_satisfied) {
    return $value;
  } else {
    $message = 'message detailing reason for EPIC FAIL!';
    throw new sfValidatorError($validator, $message);
  }
}
</pre>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2010/01/01/using-sfvalidatorcallback/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>sfDoctrineGuardPlugin: Signup, Validation and Profile</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/</link>
		<comments>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 16:39:57 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[csrf token]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[registration]]></category>
		<category><![CDATA[sfDoctrineGuardPlugin]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434</guid>
		<description><![CDATA[I am a big fan of using plugins in symfony especially that are well written and save me a bunch of time implementing some bog standard functionality. SfDoctrineGuardPlugin is an...]]></description>
			<content:encoded><![CDATA[<p>I am a big fan of using plugins in symfony especially that are well written and save me a bunch of time implementing some bog standard functionality. SfDoctrineGuardPlugin is an example of one such plugin but due the generic nature of the signup process there is a lot left to be implemented even after using the plugin. There are various other plugins that try and bridge the gap but i find myself stuggling with them especially when they try and do a lot more than I actually mode. So I thought I would document my process of implementing the signup module and document the bits of information that I found were missing.</p>
<p><strong>Note</strong>: This process works for symfony 1.2 onwards (currently using 1.4)</p>
<p>So the first thing to do is write a custom form class that extends the sfGuardUser.class.php were you can add your additional fields and validation like <code>password</code>, <code>password_confirmation</code>, accepting terms and conditions etc. Also this is the place where you would need to disable the fields that you don&#8217;t in the register form. The class below is called RegisterForm.class.php and i have tried to keep it pretty documented as possible. </p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/**
 * RegisterForm for signup process and requires
 * sfGuardPlugin
 *
 * @author Rajat Pandit
 */
class RegisterForm extends sfGuardUserForm {
    public function configure()
    {
        // remove the fields that you no longer need
        unset(
            $this['is_active'],
            $this['is_super_admin'],
            $this['updated_at'],
            $this['groups_list'],
            $this['permissions_list'],
            $this['last_login'],
            $this['created_at'],
            $this['salt'],
            $this['algorithm']
            );

        // change the name format as we dont want to the
        // world to know that we are using sfGuardPlugin
        $this-&gt;widgetSchema-&gt;setNameFormat('signup[%s]');

        // Setup proper password validation with confirmation
        $this-&gt;widgetSchema['password']                 = new sfWidgetFormInputPassword();
        $this-&gt;widgetSchema['password_confirmation']    = new sfWidgetFormInputPassword();
        $this-&gt;widgetSchema['toc']                      = new sfWidgetFormInputCheckbox();

        $this-&gt;widgetSchema-&gt;setLabel('username', 'Email');
        $this-&gt;widgetSchema-&gt;setLabel(
                'password_confirmation',
                'Confirm Password'
            );
        $this-&gt;widgetSchema-&gt;setLabel(
                'toc',
                'I agree to the Terms of Service, Privacy, &amp; Refund policies'
            );

        $this-&gt;validatorSchema['username'] 	= new sfValidatorEmail(
                array(),
                array(
                        'required' =&gt; 'Please provide an email address',
                        'invalid'  =&gt; 'Please enter a valid email address'
                     )
                    );
        $this-&gt;validatorSchema['toc']       = new sfValidatorBoolean(
                                        array('required' =&gt; true),
                                        array(
                                            'required' =&gt;
                                            'You need to accept the terms and conditions to proceed')
                                             );

        $this-&gt;validatorSchema['password_confirmation'] = clone $this-&gt;validatorSchema['password'];
        $this-&gt;validatorSchema['password']-&gt;setOption('required', true);
        $this-&gt;widgetSchema-&gt;moveField('password_confirmation', 'after', 'password');
        $this-&gt;mergePostValidator(new sfValidatorSchemaCompare('password',
                                        sfValidatorSchemaCompare::EQUAL, 'password_confirmation',
                                        array(),
                                        array(
                                                'required' =&gt; 'You are required to enter a password'
                                            )));

    }
}
</pre>
<p>The next thing is to create a template that will represent this form. I shall leave that as an exercise for the user. <a href="http://www.symfony-project.org/jobeet/1_4/Doctrine/en/10">You can read more about it on the symfony documentation section</a>.</p>
<p>Now in your action, you need to write the bit of code that will send the form object to the view and then handle  saving the object. The other interesting thing I am doing in my action is to create and update the profile table as well. The schema that i have used for profile table is as follows, its important to have all the values in the <code>relations</code> section to be setup properly otherwise the sfGuardUser()->getProfile() won&#8217;t work.</p>
<pre class="brush: bash; title: ; notranslate">
sf_guard_user_profile:
  actAs:
    Timestampable: ~
  columns:
    user_id:                      { type: integer(4), notnull: true}
    first_name:                   { type: string(200)}
    last_name:                    { type: string(200)}
    token:                        { type: string(32) }
  relations:
    User:
      class: sfGuardUser
      local: user_id
      foreign: id
      foreignAlias: Profile
      foreignType: one
      type: one
      onDelete: CASCADE
</pre>
<p>The code for the action is as follows:</p>
<pre class="brush: php; title: ; notranslate">
  public function executeRegister(sfWebRequest $request)
  {
      $params = $request-&gt;getParameter('signup');
      $this-&gt;form = new RegisterForm();
      if ($request-&gt;isMethod('post')) {
          $this-&gt;form-&gt;bind($params);
          // save the object is the user
          // details entered a correct and everything else is place.
          if ($this-&gt;form-&gt;isValid()) {
              $this-&gt;form-&gt;save();
              // get the user object
              $user = $this-&gt;form-&gt;getObject();

              // get the normal user group
              $normal_user_group = sfConfig::get('app_config_normal_user');

              // deactivate the account, till the user verifies the account
              $user-&gt;setIsActive(false);

              // set the activation token
              $profile = $user-&gt;getProfile();
              $profile-&gt;setToken(md5(time()));

              // notify the user about the signup
              $this-&gt;notifySignup($user, $profile);
              $user-&gt;save(); // save the record in the database

              $this-&gt;getUser()-&gt;setFlash('register_confirm', true);
          }
      }
  }
</pre>
<p>Just as an additional note, this is not a copy-paste-use solution, this is just a pointer of how you can get something working and then write additional code in the right place to extend things. Leave a comment if you have a question and I would be happy to answer it.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Creating utf-8 tables in symfony 1.4 /doctrine 1.2</title>
		<link>http://blog.rajatpandit.com/2009/12/19/creating-utf-8-tables-in-symfony-1-4-doctrine-1-2/</link>
		<comments>http://blog.rajatpandit.com/2009/12/19/creating-utf-8-tables-in-symfony-1-4-doctrine-1-2/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 00:35:32 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=421</guid>
		<description><![CDATA[Recently I had an issue on one of my work websites where the database schema was setup in Latin-1 encoding, this was fine till the encoding of the website was...]]></description>
			<content:encoded><![CDATA[<p>Recently I had an issue on one of my work websites where the database schema was setup in Latin-1 encoding, this was fine till the encoding of the website was also set to iso-8859-1 and nothing fancy was going on. However later in the last few months, I had been doing some development which required me to change the encoding to utf-8 and that resulted in a lot of issues. Some I am still resolving. One of the two solutions that we came up was assign it a custom function for &#8216;escaping_strategy&#8217;, which however wasn&#8217;t the silver bullet to fix as there was more crazy code that was getting raw value from the model and hence our function would get by passed. I am still looking for better ways of fixing it (seems very likely a case of massive re-factoring required) however, this one tip was handy.</p>
<p>If you want to create an individual table to be utf-8 then in the schema.yml you can add.</p>
<pre class="brush: bash; title: ; notranslate">
User:
  options:
    type: MyISAM
    collate: utf8_unicode_ci
    charset: utf8
  columns:
    username: string(255)
    password: string(255)
</pre>
<p>However this can be a painful repetitive task, especially if you have loads and loads of tables to work with. In case you are like me and prefer all your tables to be utf-8 by default, you can add this function to your ProjectConfiguration.class.php file.</p>
<pre class="brush: php; title: ; notranslate">
  public function configureDoctrine(Doctrine_Manager $manager)
  {
    $manager-&gt;setCollate('utf8_unicode_ci');
    $manager-&gt;setCharset('utf8');
  }
</pre>
<p>and then rebuild all the models (and possibly load your fixtures if you have any.</p>
<pre class="brush: bash; title: ; notranslate">
# symfony doctrine:build --all --and-load --env=dev --no-confirmation
</pre>
<p>Obviously bare in mind that this will drop your database and re-create the tables with utf-8 encoding. </p>
<p>If anyone has any suggestions for my problem, do leave a comment.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/12/19/creating-utf-8-tables-in-symfony-1-4-doctrine-1-2/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Upgrading to symfony 1.4</title>
		<link>http://blog.rajatpandit.com/2009/12/07/upgrading-to-symfony-1-4/</link>
		<comments>http://blog.rajatpandit.com/2009/12/07/upgrading-to-symfony-1-4/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 20:49:25 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[1.4]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=415</guid>
		<description><![CDATA[To typically upgrade the version of symfony, I usually run the command But it seems that the channel details have updated you would require updating that first and then you...]]></description>
			<content:encoded><![CDATA[<p>To typically upgrade the version of symfony, I usually run the command</p>
<pre class="brush: bash; title: ; notranslate">
# sudo pear upgrade symfony/symfony
</pre>
<p>But it seems that the channel details have updated you would require updating that first and then you can upgrade to symfony 1.4. This is what i did.</p>
<pre class="brush: bash; title: ; notranslate">
rp@devbox:/usr/share/php/symfony$ sudo pear channel-update pear.symfony-project.com
Updating channel &quot;pear.symfony-project.com&quot;
Update of Channel &quot;pear.symfony-project.com&quot; succeeded

rp@devbox:/usr/share/php/symfony$ sudo pear upgrade symfony/symfony
downloading symfony-1.4.0.tgz ...
Starting to download symfony-1.4.0.tgz (3,145,121 bytes)
............................................
............................................
done: 3,145,121 bytes
upgrade ok: channel://pear.symfony-project.com/symfony-1.4.0
rp@devbox:/usr/share/php/symfony$
</pre>
<p>Hope this helps someone else trying to upgrade as well.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/12/07/upgrading-to-symfony-1-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Doctrine_Parser_Exception] Fail-some error message!</title>
		<link>http://blog.rajatpandit.com/2009/08/23/doctrine_parser_exception-fail-some-error-message/</link>
		<comments>http://blog.rajatpandit.com/2009/08/23/doctrine_parser_exception-fail-some-error-message/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 17:50:26 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[jwage]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=369</guid>
		<description><![CDATA[If your precious evening hacking time has been wasted by this useless error message: Then look no further, this was the oddest error message which caused errors inconsistently when generating...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doctrine-project.org/"><img src="http://blog.rajatpandit.com/wp-content/uploads/2009/08/doctrine-orm-php5.png" alt="doctrine" title="doctrine" width="191" height="53" class="alignright size-full wp-image-370" /></a><br />
If your precious evening hacking time has been wasted by this useless error message:</p>
<pre class="brush: bash; title: ; notranslate">
rp@devbox:trunk$ php symfony --trace doctrine:build-all-reload --no-confirmation
&gt;&gt; doctrine  dropping databases
&gt;&gt; doctrine  Successfully dropped database f...octrine&quot; named &quot;secret_project&quot;
&gt;&gt; doctrine  creating databases
&gt;&gt; doctrine  Successfully created database f...octrine&quot; named &quot;secret_project&quot;
&gt;&gt; doctrine  generating model classes

  [Doctrine_Parser_Exception]
  Unable to parse string: Unable to parse line 0 (  

Exception trace:
  at ...
....
</pre>
<p>Then look no further, this was the oddest error message which caused errors inconsistently when generating models or updating the schema files. It turned out that the error was due to </p>
<ul>
<li>vim swap files</li>
<li>osx ._ files</li>
</ul>
<p>The parser would pick up all the files even if it started with a . (dot) which then borks of-course coz it wasn&#8217;t in the format it would expect it to be in</p>
<p>What would have been useful would be to have more meaningful error message like full path+file name and also the parser shouldnt pickup . (dot) files in the first place, dont see why a developer would want to keep his config files starting with a . (dot) unless its a .htaccess file.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/08/23/doctrine_parser_exception-fail-some-error-message/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>truncate table propel style.</title>
		<link>http://blog.rajatpandit.com/2009/07/30/truncate-table-propel-style/</link>
		<comments>http://blog.rajatpandit.com/2009/07/30/truncate-table-propel-style/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 13:37:31 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[propel]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=362</guid>
		<description><![CDATA[a quick post to note how to truncate the table using propel:]]></description>
			<content:encoded><![CDATA[<p>a quick post to note how to truncate the table using propel:</p>
<pre class="brush: php; title: ; notranslate">
Propel::getConnection('connection_name')-&gt;executeUpdate('TRUNCATE TABLE put_table_name_here');
</pre>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/07/30/truncate-table-propel-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony development process</title>
		<link>http://blog.rajatpandit.com/2009/07/11/symfony-development-process/</link>
		<comments>http://blog.rajatpandit.com/2009/07/11/symfony-development-process/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 10:48:55 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=345</guid>
		<description><![CDATA[My development process involves using doctrine and svn. Documenting my development steps to make sure I can put this is some sort of build script in future. Creating svn directories...]]></description>
			<content:encoded><![CDATA[<p>My development process involves using <a href="http://www.doctrine-project.org/">doctrine</a> and <a href="http://subversion.tigris.org/">svn</a>. Documenting my development steps to make sure I can put this is some sort of build script in future.</p>
<p>Creating svn directories</p>
<pre class="brush: bash; title: ; notranslate">
svn mkdir -m &quot;create default directories&quot; http://svn.clients.rajatpandit.com/project-name/trunk http://svn.clients.rajatpandit.com/project-name/tags http://svn.clients.rajatpandit.com/project-name/branches
</pre>
<p>Checkout these directories locally:</p>
<pre class="brush: bash; title: ; notranslate">
svn co http://svn.clients.rajatpandit.com/project-name/ .
</pre>
<p>Move to the <code>trunk</code> directory</p>
<pre class="brush: bash; title: ; notranslate">
cd trunk
</pre>
<p>Creating a new project</p>
<pre class="brush: bash; title: ; notranslate">
$  symfony generate:project brp
$ php symfony generate:app --escaping-strategy=on --csrf-secret=s3cr3t fe
</pre>
<p>Clear cache and log and add that to svn</p>
<pre class="brush: bash; title: ; notranslate">
rm -rf cache/* log/*
chmod 777 cache/ log/
svn add *
</pre>
<pre class="brush: bash; title: ; notranslate">
svn propedit svn:ignore cache
svn propedit svn:ignore log
</pre>
<p>Enter * in both the cases so that no files in cache and log get commited to svn</p>
<p>Add the new files to svn</p>
<pre class="brush: bash; title: ; notranslate">
svn ci -m 'adding the initial set of files'
</pre>
<p>Update the database settings, add the doctrine plugin and disable the propel plugin instead, edit the file <code>config/ProjectConfiguration.class.php</code><br />
and update the line with the following line:</p>
<pre class="brush: php; title: ; notranslate">
  $this-&gt;enableAllPluginsExcept(array('sfPropelPlugin', 'sfCompat10Plugin'));
</pre>
<p>Publish the plug-in assets</p>
<pre class="brush: bash; title: ; notranslate">
rp@devbox:~/websites/project-name/trunk$ php symfony plugin:publish-assets
    plugin    Configuring plugin - sfProtoculousPlugin
    plugin    Configuring plugin - sfDoctrinePlugin
</pre>
<p>Delete the files for the propel plugin:</p>
<pre class="brush: bash; title: ; notranslate">
svn delete web/sfPropelPlugin
svn delete config/propel.ini
svn delete config/schema.yml
svn mkdir config/doctrine
</pre>
<p>Create new schema file and remove the default schema file.</p>
<pre class="brush: bash; title: ; notranslate">
rp@devbox:~/websites/project-name/trunk$ cd config/doctrine/
rp@devbox:~/websites/project-name/trunk/config/doctrine$ touch schema.yml
rp@devbox:~/websites/project-name/trunk/config/doctrine$ svn add schema.yml
A         schema.yml
rp@devbox:~/websites/project-name/trunk/config/doctrine$ svn ci -m 'adding schema for app'

svn delete config/databases.yml
svn ci -m 'removed the default databases.yml file'
</pre>
<p>Add database configuration settings:</p>
<pre class="brush: bash; title: ; notranslate">
php symfony configure:database --name=doctrine --class=sfDoctrineDatabase &quot;mysql:host=127.0.0.1;dbname=project1&quot; root password
</pre>
<p>Link to externals so that the  latest version of the plugins and symfony gets checked out:</p>
<pre class="brush: bash; title: ; notranslate">
cd lib/
svn mkdir vendor
svn propedit svn:externals lib/vendor
svn ci -m 'updating symfony to version 1.2.7'
svn update lib/vendor/
</pre>
<p>That pulls out the most updated tagged version  of <a href="http://symfony-project.org">symfony</a>.</p>
<p>Update the configuration file <code>config/ProjectConfiguration.class.php</code> to use the local <a href="http://symfony-project.org">symfony</a> version instead of the site-wide settings. </p>
<pre class="brush: php; title: ; notranslate">
require_once dirname(__FILE__) . '/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
</pre>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/07/11/symfony-development-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a Criteria statement for the IN Operator</title>
		<link>http://blog.rajatpandit.com/2009/04/16/writing-a-criteria-statement-for-the-in-operator/</link>
		<comments>http://blog.rajatpandit.com/2009/04/16/writing-a-criteria-statement-for-the-in-operator/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 23:20:51 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[criteria]]></category>
		<category><![CDATA[propel]]></category>
		<category><![CDATA[sql statement]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=256</guid>
		<description><![CDATA[This is going to be a quick post as I needed to write this done as its quite useful for anyone who either doesnt like or doesnt understand how the...]]></description>
			<content:encoded><![CDATA[<p>This is going to be a quick post as I needed to write this done as its quite useful for anyone who either doesnt like or doesnt understand how the complex criteria objects work.</p>
<p>If you want to write code for a criteria object for the SQL statement which is something like this.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT field1, field2 from table1 where field1 in (5,30,23)
</pre>
<p>The corresponding <code>PHP</code> for that would be as follows</p>
<pre class="brush: php; title: ; notranslate">
$values = array(5,30,23);
$criteria_for_select = new Criteria();
$c = new Criteria();
$criteria_for_select = $c-&gt;getNewCriterion(table1::field1, $values, Criteria::IN);
</pre>
<p>That&#8217;s pretty much it, now this criteria object <code>$criteria_for_select</code> can now be used in your <code>doSelectXXX</code> calls.</p>
<p>Another really cool app that automates the task of writing criteria object is availabile here.<br />
<a href="http://propel.jondh.me.uk/">http://propel.jondh.me.uk/</a></p>
<p>The cool thing about this utility is you drop in your selection condition and it will write the code for the criteria object for you, now that&#8217;s really cool.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/04/16/writing-a-criteria-statement-for-the-in-operator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

