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: Ken Anderson <email@hidden>
- Date: Thu, 1 Apr 2010 03:15:33 -0400
Just say "NO". Seriously, I've tried this before - went with the roles paradigm and never looked back.
Ken
On Mar 31, 2010, at 10: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? 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 (^_^)
>
> Ramsey _______________________________________________
> 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
_______________________________________________
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