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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to