Open GoogleCodeExporter opened 9 years ago
Fixed this issue through enabeling setting a primary key for Zend_Select. To
enable this property it was necessary to modify one of the ZFDatagrid Core
files. After my modification you can use the setPrimaryKey method as known from
other sources.
- File: Bvb/Grid/Source/Zend/Select.php
- Add the following snipet below line 1460:
// Modified by: goedecke@net-studios.de
// Date: 27. July 2012 - 15:37
// In case no primary key is set use manual set variable
if (empty ($keys)) {
$keys = $this->_primaryKey;
}
return $keys;
}
/**
* Modified by: goedecke@net-studios.de
* Date: 27. July 2012 - 15:41
* @param array $pk
* @return Bvb_Grid_Source_Zend_Select
*/
public function setPrimaryKey(array $pk)
{
$this->_primaryKey = $pk;
return $this;
}
- Insert the following line in the controller you are using to display the
select:
$source->setPrimaryKey(array ('pk1'));
Issue solved ;-)
Find attached my modified Select.php.
Have fun.
Net-Studios - Webdesign Stuttgart / Germany
Original comment by kevin.go...@gmail.com
on 5 Sep 2012 at 2:09
Attachments:
Forgot one step:
Add the following line at the beginning:
protected $_primaryKey;
To introduce the variable ;-)
Regards
Original comment by kevin.go...@gmail.com
on 5 Sep 2012 at 2:10
Original issue reported on code.google.com by
goede...@elation-studios.de
on 27 Jul 2012 at 1:00