Re: Can an entity be promoted in single table inheritance?
Re: Can an entity be promoted in single table inheritance?
- Subject: Re: Can an entity be promoted in single table inheritance?
- From: Ramsey Lee Gurley <email@hidden>
- Date: Thu, 01 Apr 2010 08:28:12 -0400
I suspected as much, but I was curious and had to ask (^_^)
Thanks to everyone for the replies!
Ramsey
On Mar 31, 2010, at 10:54 PM, Chuck Hill wrote:
>
> On Mar 31, 2010, at 7:48 PM, Ramsey Lee Gurley wrote:
>
>> I can't see this being possible in Vertical or Horizontal, but with single table... could the qualifying attribute be updated to 'promote' an entity to a new class?
>
> F**k No!
>
> Do NOT try this. Use the Role pattern or something that won't make EOF insane.
>
>
>
>> Let's say we have we have an abstract Person entity with three subclasses, Peasant, Knight, King. If I wanted to promote a knight to king, is it possible to simply update my type attribute from knight to king and EOF will start treating that record as a king instead of a knight? I would assume I would need to invalidate the existing knight object after saving changes so it could be refetched as a king... and if I had multiple instances, I'd need to invalidate it in those instances too... but is it possible? Or will EOF just flip out in the saveChanges() and refuse to do it?
>>
>> Just an academic question, of course (^_^)
>
>
> You could maaaaybe get it to work if you invalidated enough things. But, really, do you want hair on your palms?
>
>
> 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
>
>
>
>
>
>
>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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