Re: Multiple instances of EOModel in an application.
Re: Multiple instances of EOModel in an application.
- Subject: Re: Multiple instances of EOModel in an application.
- From: Art Isbell <email@hidden>
- Date: Wed, 23 Jun 2004 22:35:52 -1000
On Jun 23, 2004, at 9:27 PM, Marek Wawrzyczny wrote:
I was however hoping that we could somehow use multiple instances of
EODatabase and other relevant classes to simply "choose" the right
EODatabaseContext/EOEditingContext at runtime, depending on which
database we need to handle... Furthermore, we'd only ever need one
EOModel and simply use it to instantiate all the database contexts
while programatically changing its connection dictionary... we could
read these from a configuration file meaning that we'd never have to
recompile the app if we add another database to the pool...
Hmm, this might be possible. You'd probably need to create a complete
EOAccess stack for each database from EOObjectStoreCoordinator on down.
You'd probably have to manually load the eomodel and add it to a new
EOModelGroup for each database. You'd need to create an
EODatabaseContext using
registeredDatabaseContextForModel(EOModel model,
EOObjectStoreCoordinator coordinator). So making this work might not
be anything more than a bookkeeping problem - well, maybe a little bit
more :-) Shouldn't take very long to write a simple test app.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.