Closed GoogleCodeExporter closed 9 years ago
Hi,
1. Fixed. Thanks
2.
A few changes have been made.
The source have been abstracted and now the query() method has been replaced
with
setSource() method. (You can still use it, bu tit will be deprecated and only
works
with Zend_Db_*)
Examples:
$grid->setSource(new Bvb_Grid_Source_Zend_Select(Zend_Db_Select $select));
$grid->setSource(new Bvb_Grid_Source_Zend_Select(Zend_Db_Table_Abstract
$model));
Should be:
$this->_zfDatagrid->setSource(new Bvb_Grid_Source_Zend_Table(MY_MODEL));
3. Fixed. Thanks
4. By the end of the month draft and RC. No 'big' changes awaited. API should
be final.
Check http://zfdatagrid.com/grid/ source code. It has the latest revision and
all
possible data sources examples.
Thanks for your comments,
Best Regards,
Bento Vilas Boas
Original comment by pao.fre...@gmail.com
on 24 Feb 2010 at 2:42
Hi,
Two issues:
A. I had to change the filter definition by adding table name (addressbook.)to
the
Field option. Otherwise, "Field 'name' ambiguous..." appears.
->addFilter('name', array(
'distinct' => array(
'field' => 'addressbook.name',
'name' => 'name',)))
Is this intended?
B. These Filters do not work any more:
1.
->addFilter('countryID', array(
'distinct' => array(
'field' => 'countryID',
'name' => 'countryID'))) << displays countryIDs (numbers)
'name' => 'countries.name'))) << doesn't work
'name' => 'countries_1.name'))) << works correctly
Table name is 'countries', but "someone" is adding '_1'.
2.
->addFilter('userID', array(
'distinct' => array(
'field' => 'userID',
'name' => 'userID'))) << displays userIDs
'name' => 'users.name'))) << works correctly, no '_1' in table name
Original comment by vlatko.b...@gmail.com
on 24 Feb 2010 at 6:15
Hi,
No, it is not an intended situation.
Please check the latest Revision 653
Best Regards,
Bento Vilas Boas
Original comment by pao.fre...@gmail.com
on 25 Feb 2010 at 12:16
Comment 1:
(2.) setModel() now must be explicitly called for Form. Intended?
(3.) Another function
Class 'Bvb_Grid_Source_Doctrine_Record' must implement inherited abstract method
'update(...)'
/zfDatagrid/library/Bvb/Grid/Source/Doctrine/Record.php line 21
Comment 3:
No, it doesn't work yet. I'm at rev 658.
->addFilter('countryID', array(
'distinct' => array(
'field' => 'countryID',
'name' => 'countryID'))) << displays countryIDs (numbers)
'name' => 'countries.name'))) << doesn't work
'name' => 'countries_1.name'))) << works correctly
'name' => 'name'))) << displays names of Users, not countries
Original comment by vlatko.b...@gmail.com
on 25 Feb 2010 at 10:09
Hi,
Is countryID in your fields query?
Best Regards,
Bento Vilas Boas
Original comment by pao.fre...@gmail.com
on 27 Feb 2010 at 7:29
Hi,
I'm not limiting the number of fields, so all fields from model are in the
query.
countryID is a FK in addressbook table to to countries table id. Table
countries is
linked by reference map in a model. Below is the SQL.
This used to work before:
'field' => 'countryID',
'name' => 'countryID'
Now this works correctly, but the name "countries_1" is problematic. It is
autogenerated.
'field' => 'countryID',
'name' => 'countries_1.name'
SQL relations:
CREATE TABLE `countries` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
);
CREATE TABLE `infoverb_iva`.`addressbook` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`countryID` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_addresbook_countryID` (`countryID`) USING BTREE,
CONSTRAINT `fk_addresbook_countries` FOREIGN KEY (`countryID`) REFERENCES
`countries` (`id`)
);
Original comment by vlatko.b...@gmail.com
on 28 Feb 2010 at 10:29
Hi,
Some changes made to the model class.
Can you please try it again.
Sorry....
Best Regards,
Bento Vilas Boas
Original comment by pao.fre...@gmail.com
on 28 Feb 2010 at 3:59
Hi,
works now.
Original comment by vlatko.b...@gmail.com
on 28 Feb 2010 at 6:23
Original comment by pao.fre...@gmail.com
on 28 Feb 2010 at 9:56
Original comment by bento.vi...@gmail.com
on 3 Mar 2010 at 4:56
Original issue reported on code.google.com by
vlatko.b...@gmail.com
on 24 Feb 2010 at 11:49