Re: Mapping multiple EOs to one table
Re: Mapping multiple EOs to one table
- Subject: Re: Mapping multiple EOs to one table
- From: Chuck Hill <email@hidden>
- Date: Wed, 20 Aug 2003 12:45:22 -0700
At 02:09 PM 20/08/2003 -0500, Ricardo Strausz wrote:
>
>>> Can you be more specific in "when does it works" and "when do not"
>>> please. I was tring a simple experiment my self and had not found yet
>>> anything "unexpected"...
>>>
>> I think he meant that as long as he used KVC and only referred to
>> common attributes that the fact the object was of the *wrong
>> Java class* did not raise any exceptions.
>
>I also use KVC...
>
That works fine until you need to use some Java code when the class of the
object starts to matter.
>>> May be I shoud add that, from Chuck's observations on the GolbalID, I
>>> decided to be care not to "show" two children at the same time; that
>>> is, if requested by the user, I use the parent entity insteed.
>>>
>> But that is not the same object! parent != child
>
>Sure! but in the parent are all atributes of both (all) childs...
>The only thing to care here ---as far as my experiment goes--- is to
>put the "common" logic in the parent object (I mean here, the logic
>which makes sense when "seeing" the holl row at once)...
>
>Does this makes some sense to you?
>
While it might work it sort of offends my sense of OO design. :-) A big
reason for sub-classing is refinement of behaviour. What you are doing
kills that. Yes, it will be OK if you always treat the objects as the
parent object, but then what does that achieve? If this does what you
want, fine by me.
Chuck
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.