Hi,
you can add a listener in your Application class.
For example:
...
public Application()
{
super();
...
NSNotificationCenter.defaultCenter().addObserver(this,
new NSSelector("modelAddedNotification", new Class[] {
NSNotification.class }),
EOModelGroup.ModelAddedNotification, null);
...
}
public void modelAddedNotification(NSNotification notification)
{
EOModel aModel = (EOModel) notification.object();
NSMutableDictionary connDict;
connDict = new NSMutableDictionary(aModel.connectionDictionary());
// Set your connection stuff
aModel.setConnectionDictionary(connDict);
}
Stefan
Logi Helguson schrieb:
Hi all,
I want to perform a unit test against my development database. I'm
configuring my database connection by setting the connection dictionary of
my model manually( model.setConnectionDictionary ) and adding the model to
the EOModelGroup.defaultGroup.
When I fetch objects from my editing context( ERXEC.newEditingContext )
the model is connected to the deployment database( as set in the default
connection properties of the model ) but not my development database as I
set manually :(
Any ideas what's the proper way to set the connection correctly?
With well-being and veneration,
Logi Helgu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/stefan.klein%40buero-sde.de
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]