Issues

ZF-10626: Select in findManyToManyRowset does not contain columns of intersection-table anymore

Issue Type: Bug Created: 2010-11-02T14:02:32.000+0000 Last Updated: 2010-11-20T21:40:36.000+0000 Status: Resolved Fix version(s): Reporter: Fabian Hohm (hohmsen) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db_Table

Related issues: - ZF-6232

Attachments:

Description

I am using additional columns in some of my intersection tables for many to many relationships. Using findManyToManyRowset used to add these columns to the returning rowset. Having updated to the newest version, these columns dont get added anymore.

Source-Code:

Class: Zend_Db_Table_Row_Abstract In version 1.9.8 the function findManyToManyRowset returned the columns of the intersection table like so:

    $select->from(array('i' => $interName), *Zend_Db_Select::SQL_WILDCARD*, $interSchema)
           ->joinInner(array('m' => $matchName), $joinCond, Zend_Db_Select::SQL_WILDCARD, $matchSchema)
           ->setIntegrityCheck(false);

This has been changed to:

    $select->from(array('i' => $interName), *array()*, $interSchema)
           ->joinInner(array('m' => $matchName), $joinCond, Zend_Db_Select::SQL_WILDCARD, $matchSchema)
           ->setIntegrityCheck(false);

Is this change intended - and if so, how do I access the columns in the intersection table using the functionality of this function?

Comments

Posted by Ralph Schindler (ralph) on 2010-11-20T21:40:36.000+0000

This is by design. The junction data should have never been part of the resulting row object to begin off with. Please see my write-up here:

http://ralphschindler.com/2010/11/…

Thanks, Ralph

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts