Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Peer::DATABASE_NAME

propel
Discussion topic

Back to topic list

Peer::DATABASE_NAME

Reply

Author Robert Bruce <rob at thirddimensiondesign dot co dot uk>
Full name Robert Bruce <rob at thirddimensiondesign dot co dot uk>
Date 2007-04-03 15:34:34 PDT
Message I recently came up against something that was causing a problem, I may
have been doing this incorrectly, so please correct me if that's the case.

I want to reuse the generated classes for multiple databases, so
effectively they exist as part of a shared library for instances of my
application. However because the DATABASE_NAME constant in the Peer
classes is set to the name of the database against which they were
originally built, I can't (to my knowledge) dynamically use a different
database.

I have created a static method getDatabaseName which reads the
Propel::getConfiguration, then have gone through all the code in the
engine/builder/om/php5 replacing ::DATABASE_NAME with
::getDatabaseName(). Everything seems to be working fine now, but is
there another way I could have done this?

Rob
Attachments

« Previous message in topic | 38 of 44 | Next message in topic »

Messages

Show all messages in topic

Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 05:47:19 PST
     Re: [propel-dev] Powered by propel? Robert Bruce <rob at tdd dot org dot uk> Robert Bruce <rob at tdd dot org dot uk> 2007-02-16 06:53:40 PST
         Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 07:03:42 PST
             Re: [propel-dev] Powered by propel? Robert Bruce <rob at tdd dot org dot uk> Robert Bruce <rob at tdd dot org dot uk> 2007-02-16 08:03:56 PST
                 Re: [propel-dev] Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 07:05:19 PST
                     Re: [propel-dev] Powered by propel? Robert Bruce <rob at tdd dot org dot uk> Robert Bruce <rob at tdd dot org dot uk> 2007-02-16 08:09:30 PST
                         Re: [propel-dev] Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 07:11:14 PST
                         Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 07:14:41 PST
                 Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 07:15:28 PST
             Re: [propel-dev] Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 07:06:55 PST
                 Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 07:13:31 PST
                     Re: [propel-dev] Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 07:14:19 PST
                         Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 07:20:43 PST
                             Re: [propel-dev] Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 07:31:14 PST
                                 Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 07:36:55 PST
                                     Re: [propel-dev] Powered by propel? Robert Bruce <rob at tdd dot org dot uk> Robert Bruce <rob at tdd dot org dot uk> 2007-02-16 08:47:38 PST
                                         Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 07:55:58 PST
             Re: [propel-dev] Powered by propel? =?ISO-8859-1?Q?David_Z=FClke?= <dz at bitxtender dot com> =?ISO-8859-1?Q?David_Z=FClke?= <dz at bitxtender dot com> 2007-02-16 14:36:45 PST
                 Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 14:41:00 PST
                     Re: [propel-dev] Powered by propel? Robert Bruce <rob at thirddimensiondesign dot co dot uk> Robert Bruce <rob at thirddimensiondesign dot co dot uk> 2007-02-16 15:26:45 PST
                         Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 16:22:22 PST
                         Re: [propel-dev] Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 17:18:24 PST
                             Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 17:57:01 PST
                                 Re: [propel-dev] Powered by propel? hlellelid Hans Lellelid 2007-02-16 18:01:04 PST
                                     Re: [propel-dev] Powered by propel? Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-02-16 18:39:56 PST
Page: of 2 « Previous | Next »
Messages per page: