Single table inheritance and non-null attributes
Single table inheritance and non-null attributes
- Subject: Single table inheritance and non-null attributes
- From: Clark Mueller <email@hidden>
- Date: Thu, 30 Nov 2006 14:12:54 -0700
Hello,
i've been playing with single table inheritance today, and I've run
across something that I'm curious about. It appears that if I define
entities like so:
Super:
- id (not null)
- qualifier (not null)
Sub1 (qualifier = 1):
- sub1RequiredAttr (not null)
Sub2 (qualifier = 2):
- sub2RequiredAttr (not null)
EOModeler generates SQL that results in a table that has ALL of the
above fields defined as non-null. So... what happens at runtime if I
try to commit a Sub1 or Sub2 to the database? What happens with
required fields (in the database) that are not a part of a given
subclass? Does EOF provide some dummy value for those, or do I need
to handle it in another way?
Thanks & regards,
Clark
_______________________________________________
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