I'm trying to add a couple of extra DB fields to page comments, but I've got totally stuck with the error from the title. Code in questions is:
class OurPageComment extends PageComment {
static $db = array(
"Company" => "Varchar(100)",
"Email" => "Varchar(255)",
"Homepage" => "Varchar(255)",
);
}
As you can see I've just tried extending PageComment the same way it's done with other classes in tutorials/docs, but it obviously can't be done that way.
Error trace (when I go to /db/build/..):
* Bad class to singleton() - OurPageComment
Line 263 of Core.php
* singleton(OurPageComment)
Line 161 of DatabaseAdmin.php
* DatabaseAdmin->doBuild()
Line 81 of DatabaseAdmin.php
* DatabaseAdmin->build(HTTPRequest)
Line 162 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 257 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 106 of Director.php
* Director::direct(db/build)
Line 111 of main.php