Hello, I have a bit of a hard one here (on Cake 1.2.x, if it matters).
Definitely need some ideas.

I am trying to create a dynamic database connection (henceforth DDC).
Basically all model instances will connect to the dynamically created
connection. I can create the connection just fine
ConnectionManager::create works wonderfully. The question is not how
to create the connection, but WHEN to create the connection.

If all Models are going to use this DDC, then it needs to be created
before any Models are instantiated. AppController::beforeFilter runs
too late for this (as gwoo has admitted on IRC). So it needs to be
done earlier. I tried out bootstrap, but in bootstrap,
ConnectionManager has not yet been instantiated yet, so bootstrap is
too early (I could be wrong, but my testing led me to believe this is
true)

The question then is, what would the middle ground be. How would I go
about doing this, having the connection manager already created, but
the Model instances not yet created? I'm trying my hardest not to hack
into cakes core code in order to implement this.

Thank you for your help,
Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to