Re: DB_DataObject table prefix?
| From: | Justin Patrin | Date: | Wed, 08 Dec 2004 18:04:03 +0000 |
| Subject: | Re: DB_DataObject table prefix? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16118@lists.php.net to get a copy of this message | ||
On Wed, 8 Dec 2004 11:26:55 +0000, Phil Gyford <gyford@gmail.com> wrote:
> 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?
>
Great question. If an app was to allow table prefixes (as most apps
do) DB_DataObject would be a failure without this feature.... I don't
know the answer, but perhaps Alan does. ;-)
> Phil
>
--
Justin Patrin