Home » Database » DB_DataObject » Bug #3013
Adding a table prefix for tables used by DB_DataObject
Details
| Request #3013 | Adding a table prefix for tables used by DB_DataObject |
|---|---|
| Submitted | 2004-12-22 14:23 UTC |
| From | phil at gyford dot com |
| Status | Suspended |
| Package | DB_DataObject |
| PHP Version | 4.3.9 |
| OS | Mac OS X |
| Roadmaps | (Not assigned) |
Comments
[2004-12-22 14:23 UTC] phil at gyford dot com
Description:
------------
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?