omusico / zfdatagrid

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

buildQuery/getSelect with hasCondition() == false #782

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. write a custom filter
2. override hasConditions (return false)
3. override buildQuery, using the code you suggest in the wiki pages, and then 
calling for example the method "getSelect".

What is the expected output? What do you see instead?
I see
Call to a member function where() on a non-object etc. See my comment below.

Please insert the appropriate values;
                    Zend Framework version: 1.11.1
ZFDatgrid Version (Bvb_Grid::getVersion()): 0.8
                          Operating system: GNU/Linux
                               PHP Version: 5.2.10
               Database Server and version: MySQL 5.1.37
                            Source Adapter: Zend_Select

Please provide any additional information below.

In Grid.php, you don't call setSelect before buildQuery, when 
hasConditions()==false. Also, you have to populate filtersValues array after 
calling buildQuery.

Original issue reported on code.google.com by Alessand...@gmail.com on 17 Nov 2011 at 11:47

GoogleCodeExporter commented 9 years ago
Anyway, thanks for this project. :)

Original comment by Alessand...@gmail.com on 17 Nov 2011 at 11:49