DataObject - MDB2 issues

From: Date: Wed, 27 Sep 2006 07:54:55 +0000
Subject: DataObject - MDB2 issues
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25249@lists.php.net to get a copy of this message
Hi recently changed over to using MDB2 with my dataobjects: This is in my config file: - you can see I set up for MDB2 // Create the array of options for DataObjects $config['DB_DataObject'] = array(
    'database'         => DB_EXT . '://user:password@localhost/admin',
    'schema_location'  => ADMIN_DO . 'admin/schema',
    'class_location'   => ADMIN_DO . 'admin',
    'require_prefix'   => ADMIN_DO . 'admin',
    'class_prefix'     => 'DO_',
    'db_driver'        => 'MDB2',
    'extends_location' => ADMIN_DO . 'admin/Inter.php',
    'extends'          => 'DB_Inter');
I then generated the schema using: require_once 'DB/DataObject/Generator.php'; $generator = new DB_DataObject_Generator; $generator->start(); When set to DB for generation I get this schema file: [admin_news] news_id = 129 user_id = 129 title = 130 body = 194 creation_date = 129 revision_date = 129 status = 130 [admin_news__keys] news_id = N When set to MDB2 for generation i get this: [admin_news] news_id = 129 user_id = 129 title = 130 body = 162 creation_date = 129 revision_date = 129 status = 130 [admin_news__keys] news_id = K As you can see the keys have a different letter : When I think try and insert a value into the DB I get something like this: DO_Users_logins: ERROR: [mdb2_error: message="MDB2 Error: insufficient permissions" code=-27 mode=return level=notice prefix="" info="[Error message: on demand sequence admin_news could not be created] "] then set to DB again i get this message: DO_Users_logins: ERROR: [db_error: message="DB Error: insufficient permissions" code=-26 mode=return level=notice prefix="" info="CREATE TABLE users_logins_seq (id INTEGER UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY(id)) [nativecode=1142 ** CREATE command denied to user 'USER'@'localhost' for table 'users_logins_seq']"] It is trying to create a new sequence table as it cant identify with the Primary Key attribute it seems. So something is goin go that is ewither not in the docs or is a bug I am unaware off. Ian

« previous php.pear.general (#25249) next »