madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Defining reference maps remove field form the grid (not from the CRUD) #628

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set as source a model with a reference map, es:
protected $_referenceMap    = array(
        'Type' => array(
            'columns'           => 'id_type',
            'refTableClass'     => 'Model_DbTable_Anothermodel',
            'refColumns'        => 'name'
        )
    );

What is the expected output? What do you see instead?
I expect to see the "Type" column (or the original one "id_type").
But the column is removed from the table.

Please insert the appropriate values;
                    Zend Framework version: 1.11.4
ZFDatgrid Version (Bvb_Grid::getVersion()): 0.7.1
                          Operating system: Win 7 64
                               PHP Version: 5.3.4
               Database Server and version: MySql 5.1.34
                          Source Adatapter: Bvb_Grid_Source_Zend_Table 

Original issue reported on code.google.com by adamquad...@gmail.com on 25 Mar 2011 at 7:36

GoogleCodeExporter commented 9 years ago
not an issue, but a miss of documentation.
in order to show Type field in the table view of the grid I need to add 
'refBvbColumns'     

protected $_referenceMap    = array(
        'Type' => array(
            'columns'           => 'id_type',
            'refTableClass'     => 'Model_DbTable_Anothermodel',
            'refColumns'        => 'name',
            'refBvbColumns'     => 'name'
        )
    );

I don't know why, but it works, there is also refBvbFollow but I don't know 
what it does.

This library is a must have, I love it!

Original comment by adamquad...@gmail.com on 7 Apr 2011 at 9:47

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 15 Apr 2011 at 4:35