Re: Setting up horizontal inheritance
Re: Setting up horizontal inheritance
- Subject: Re: Setting up horizontal inheritance
- From: Chuck Hill <email@hidden>
- Date: Tue, 4 Nov 2008 18:00:20 -0800
On Nov 4, 2008, at 3:53 PM, Paul Hoadley wrote:
On 05/11/2008, at 8:46 AM, Chuck Hill wrote:
Just a thought... Are you using Wonder to set the connection
dictionaries for both models?
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.
Maybe similar? :-) If overrides does not have all the keys in the
connection dictionary, they won't be the same.
If the connection dictionaries are not _identical_ (and I do mean
indentical), that will cause problems. Perhaps this one. Mike
added something to Wonder, I think, to warn or throw if this
happens. I think...
I'm just using some parts of Wonder in this app at the moment, and
in particular I'm not extending ERXApplication, so I don't know
whether that prevented Wonder from helping me here.
I think you have to marry Wonder to get it to do this for you. Do you
have Practical WebObjects? Page 53 on show a much better way to do
this than what you have above.
In any case, I've made the connection dictionaries identical in the
models themselves, and the problem is solved. I don't know why
overriding those attributes in code didn't work---was I doing it in
the wrong place?
I'd guess just not completely.
I'll look into this issue, and also my future problem caused by
using the wrong sequence to insert into amperson!
Don't worry, those problems will find you! ;-)
"Just a thought..." Please pass on your thoughts any time, Chuck!
I would never have thought of looking at the connection dictionaries
as the cause for this. Thanks to all who contributed to this thread.
I only wish I had recalled this cause earlier!
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden