• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I get EO's instantiated with dynamic class?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How do I get EO's instantiated with dynamic class?
      • From: Riccardo De Menna <email@hidden>
References: 
 >How do I get EO's instantiated with dynamic class? (From: Riccardo De Menna <email@hidden>)
 >Re: How do I get EO's instantiated with dynamic class? (From: Guido Neitzer <email@hidden>)
 >Re: How do I get EO's instantiated with dynamic class? (From: Riccardo De Menna <email@hidden>)

  • Prev by Date: Re: How do I get EO's instantiated with dynamic class?
  • Next by Date: Re: How do I get EO's instantiated with dynamic class?
  • Previous by thread: Re: How do I get EO's instantiated with dynamic class?
  • Next by thread: Re: How do I get EO's instantiated with dynamic class?
  • Index(es):
    • Date
    • Thread