Hello,
Currently I'm customising the security-tab with some extra fields. I've overridden the Member-class and it works fine. Now I try to do the same thing with Group. The code i've used in _config.php is:
Object::useCustomClass('Group', 'NetwerkHolder');
Also I've created the NetwerkHolder.php
class NetwerkHolder extends Group {
static $db = array('ThemaNetwerk' => 'Varchar');
static $allow_children = array('Netwerk');
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->insertBefore(new TextField('ThemaNetwerk'), "ThemaNetwerk");
return $fields;
}
}
When I run mysite.com/db/build/?flush=1 I see that the table is created, but when I log into the cms I get a db error:
FATAL ERROR: DATABASE ERROR: Couldn't run query: SELECT `Group`.*, `NetwerkHolder`.*, `Group`.ID, if(`Group`.ClassName,`Group`.ClassName,'Group') AS RecordClassName FROM `Group` LEFT JOIN `NetwerkHolder` ON `NetwerkHolder`.ID = `Group`.ID WHERE (`ID` IN (1)) ORDER BY ID | Column 'ID' in where clause is ambiguous
At line 397 in /serverpath/public_html/sapphire/core/model/Database.php
Does anybody know what is the problem?
Thanks in advance!