Zend Many to many relationships

I want to get all the data from 3 tables

users, properties, and users_properties.

So I decided that I would use manytomanyRowset. But, to my surprise, I get data from the properties and users_properties table, but there is no data from the users table. Why is this? I need some columns from the users table, is there a way to tell manytomanyrowset functions that I need data from the current table?

this is my function

public function fetchRegisteredProperties()
{

    $userTable = $this->getTable();
    require_once APPLICATION_PATH . '/models/DbTable/UsersPropertiesDB.php';
    require_once APPLICATION_PATH . '/models/DbTable/PropertiesDB.php';

    $propertiesRowset = $table->fetchAll();
    $allProperties = array();

    foreach ($propertiesRowset as $row) {
        $propertiesRowset = $row->findManyToManyRowset(
          'Model_DbTable_Properties','Model_DbTable_UsersProperties');
        $allProperties = array_merge($tempArray,$propertiesRowset->toArray()); 
    }

    return $allProperties;
}

thanks in adavance

+3
source share
1 answer

I developed and encoded table-relations functions in the Zend Framework.

: , findManyToManyRowset() , Row. , Row ZF save() , , , .

, Row , . Rowset.

__get() __set(), , . , , , Rowset.

save(), , save() Rowset .

+6

Source: https://habr.com/ru/post/1711144/