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 13:19:58 -0700
Oh, OK. I should have guessed that...
Maybe I am getting confused too. This all started, if I recall correctly,
when Ray wanted to use more than one entity mapped to a single row to
achieve different views of the same data. That is not what EOF inheritance
is for.
For single table inheritance, each row should map to a unique entity which
maps to a unique Java class. In order for this to work each row needs to
have some column that uniquely identifies which entity it corresponds to.
Do all this and it works fine, EOF inheritance == Java inheritance.
Sub-classes can have their own behaviour and properties in addition to the
behaviour and properties inheritance from the parent(s).
If you don't have this unique mapping then EOF will get confused and create
the wrong Java class for a row (or at least wrong in the sense of what a
fetch requested). Then EOF inheritance == Java confusion.
Chuck
At 03:07 PM 20/08/2003 -0500, Ricardo Strausz wrote:
>
>On miircoles, agos 20, 2003, at 15:09 America/Mexico_City, Chuck Hill
>wrote:
>
>> At 02:58 PM 20/08/2003 -0500, Ricardo Strausz wrote:
>>
>>>>> 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.
>>>
>>> But then, how is STM supposed to be managed?
>>> I'm getting confused!
>>>
>> What does STM mean? I'm not familiar with that acronym.
>
>Sorry!
>Single Table Mapping
>
>>
>>
>> Chuck
>>
>>
>> --
>>
>> Chuck Hill email@hidden
>> Global Village Consulting Inc.
>> http://www.global-village.net
>
>
>
--
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.