Re: How do I get EO's instantiated with dynamic class?
Re: How do I get EO's instantiated with dynamic class?
- Subject: Re: How do I get EO's instantiated with dynamic class?
- From: Guido Neitzer <email@hidden>
- Date: Fri, 17 Aug 2007 10:06:18 -0600
On 17.08.2007, at 09:46, Riccardo De Menna wrote:
I'm perfectly fine with one single table holding domain info... I
simply want to fetch from it and receive specific subclasses of the
main "domain" class.
It's called "Single Table Inheritance".
Create "Domain" Entity, make it static. Have an attribute
"topLevelDomain". Make a subclass of "Domain" with Single Table
Inheritance (it's an option in Entity Modeler), call it ComDomain and
set the qualifier to be "topLevelDomain = 'com'".
There you go. Whenever you query your database for "Domain" objects,
all domains with topLevelDomain = 'com' come back as ComDomain objects.
You have one table and whatever number of Entities using it.
cug
_______________________________________________
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