On 05/11/2008, at 12:51 PM, Paul Hoadley wrote:
On 05/11/2008, at 11:11 AM, Chuck Hill wrote:
On Nov 4, 2008, at 4:23 PM, Guido Neitzer wrote:
On 04.11.2008, at 16:53, Paul Hoadley wrote:
I wasn't using Wonder, but I was using this:
EODatabaseContext.forceConnectionWithModel(model, overrides,
new EOEditingContext());
to change 'URL', 'username', and 'password' in Application's
constructor. The connection dictionaries should have been
identical after this.
Make sure that they are IDENTICAL. Really. In every aspect.
Truth. If they are not actually equals(), then are not identical
to EOF.
Just to put this thread to rest...
This time for real...
This is what I was doing to change the connection dictionaries in
Application's constructor:
model = EOModelGroup.defaultGroup().modelNamed("AMAuth");
EODatabaseContext.forceConnectionWithModel(model, overrides,
new EOEditingContext());
model = EOModelGroup.defaultGroup().modelNamed("Auth");
EODatabaseContext.forceConnectionWithModel(model, overrides,
new EOEditingContext());
and so on, for the app's five models. I didn't read the docs for
forceConnectionWithModel(): "All compatible models in the model
group also are associated with the new connection..." So not only
does it seem to be sufficient to just do it with just one model (as
commenting the other four out works, even if the connection
dictionaries in the models themselves are different), it breaks
things by doing it with all of them. So I take it that my problem
all along was calling forceConnectionWithModel() multiple times.
If I could just be wrong one more time... Calling
forceConnectionWithModel() once was not sufficient to solve the entire
problem. Using Chuck's approach on p.53-54 of Practical WebObjects was.
--
Paul.
w http://logicsquad.net/
h http://paul.hoadley.name/
_______________________________________________
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]