DB_DataObject table prefix?
| From: | Phil Gyford | Date: | Wed, 08 Dec 2004 11:26:55 +0000 |
| Subject: | DB_DataObject table prefix? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16109@lists.php.net to get a copy of this message | ||
Hi,
Is it possible to specify a table prefix for tables used by DB_DataObject?
I've just had to add prefixes to all the table names used by my
current project, and this of course means that DB_DataObject's
auto-building creates new class files with different names, which
means a lot of manual changes around the site.
eg... My .ini had this in it:
require_prefix = DataObjects/
class_prefix = DataObjects_
and I had a table called 'person' and a class called
'DataObjects_Person' in a Person.php file.
After adding table prefixes I have a table called 'myproject_person'
and a class called 'DataObjects_Myproject_person' in a
Myproject_person.php file.
I guess being able to put:
table_prefix = Myproject_
in my .ini file would be ideal but I can't find anything like this in
the documentation. Any thoughts?
Phil