<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 11:53:06 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ralph Schindler's Blog: Composite Rowsets For Many-To-Many Relationships Via Zend_Db_Table]]></title>
      <guid>http://www.phpdeveloper.org/news/15438</guid>
      <link>http://www.phpdeveloper.org/news/15438</link>
      <description><![CDATA[<i>Ralph Schindler</i> has <a href="http://ralphschindler.com/2010/11/15/composite-rowsets-for-many-to-many-relationships-via-zend_db_table">posted a handy tutorial</a> (along with some helpful code) to his blog today about handling many-to-many composite rowset  relationships with the Zend_Db component of the Zend Framework.
</p>
<blockquote>
One of the hardest problems to solve when developing an ORM of any complexity is in deciding how to handle the retrieval of rows that satisfy a <a href="http://en.wikipedia.org/wiki/Many-to-many_(data_model)">many-to-many relationship</a>, also known as a M:N relationship. [...] To model M:N relationships, database developers must get creative. By employing the use of a "3rd party", and by utilizing foreign keys that model a 1:N relationship, database developers can model a M:N relationship. 
</blockquote>
<p>
He looks at the Zend_Db_Table_Row class of the framework and how it works with these junction tables and how it has <a href="http://framework.zend.com/issues/browse/ZF-6232">an issue</a> where it returns the junction table columns too. A fix was released (in 1.10.2) for the framework to work correctly. Unfortunately, this also left those using the method out in the cold. So, <i>Ralph</i> has <a href="https://github.com/gooeylabs/Gooey-PHP-5.2-Components">created his own workaround</a> called a composite rowset. He includes an example snippet to give you an idea of how it works, but you can download the code from <a href="https://github.com/gooeylabs/Gooey-PHP-5.2-Components">his github repository</a> for a closer look.
</p>]]></description>
      <pubDate>Tue, 16 Nov 2010 11:08:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Introduction to Zend_Db]]></title>
      <guid>http://www.phpdeveloper.org/news/11326</guid>
      <link>http://www.phpdeveloper.org/news/11326</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has an <a href="http://www.lornajane.net/posts/2008/Introduction-to-Zend_Db">introduction to Zend_Db</a>, the Zend Framework database abstraction layer posted to her blog today:
</p>
<blockquote>
I recently worked on a project which was based on Zend Framework - I haven't worked with it before and I was temporarily confused by the existing implementation of some of the database-level stuff. After much reading and untangling of code, I'm now pretty clear how this should look, so here's my overview. I'm not going to go into setting up a whole application, but this is a quick primer on how data models go together.
</blockquote>
<p>
She <a href="http://www.lornajane.net/posts/2008/Introduction-to-Zend_Db">talks about</a> table modeling, fetching rows/data from the model and working with rows/rowsets.
</p>]]></description>
      <pubDate>Fri, 31 Oct 2008 12:57:07 -0500</pubDate>
    </item>
  </channel>
</rss>
