Re: Vertical inheritance with a non-abstract superclass
Re: Vertical inheritance with a non-abstract superclass
- Subject: Re: Vertical inheritance with a non-abstract superclass
- From: David Avendasora <email@hidden>
- Date: Mon, 10 Mar 2008 09:35:53 -0400
Non-abstract superclasses must have restricting qualifiers as well as
their subclasses. What were the restricting qualifiers you used? They
must be unique.
Do you have any choice in the use of Vertical Inheritance? I used to
use it as it made my "DB Normalization" voice stop screaming at me,
but in the end it was just too problematic for me.
I switched to Single Table inheritance for all my Vertical Inheritance
uses and have been much happier since. The main thing you loose is
the DB being able to accurately keep track of which fields can be null
and unique and such, but if the only system using the DB is WO, then
the Model will keep track of that for you, There's no need to do it in
the DB as well.
It took me a while, but I found that if I just trust WO to do it's job
and not try to anticipate it failing, I am a much more productive
developer.
Dave
On Mar 8, 2008, at 8:50 AM, Nathan Gabrish wrote:
I am attempting to create a subclass by inheriting from a non-
abstract superclass using the vertical inheritance method. I have
followed the steps outlined in Apples documentation for EOModeler
but I am still getting consistency checks when I save.
The consistency check that is returned when I attempt to save is as
follows:
"Entity Superclass (parent entity of Subclass) needs a restricting
qualifier in order to filter out rows in table SUPER that are only
holding data for Subclass instances"
The documentation is a little unclear (to me at least) as to whether
or not I really do need a restricting qualifier when using vertical
inheritance but I have tried adding it anyway. I have tried adding
the qualifier both to the superclass and subclass but I still get
the consistency check in each case. The only way I have found to get
around the consistency check is to mark the superclass as abstract,
however I need to be able to instantiate objects of the superclass
in this case so that is not going to work for me.
Is it possible that the consistency check is just a bug in this case
because EOModeler does not recognize which tye of inheritance
mapping I am using?
I am currently using version 5.1 of Webobjects.
_______________________________________________
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