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
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?