Re: EOF inheritance
Re: EOF inheritance
- Subject: Re: EOF inheritance
- From: Mike Schrag <email@hidden>
- Date: Tue, 8 Sep 2009 20:09:01 -0400
- Depending on the DB you use, you have to have tables for abstract
entities (e.g. in Frontbase you need a table for the root entity,
as PK generation relies on it)
That shouldn't be the case as that (== defining an external name for
the parent entity==) is vertical inheritance. And that sounds like
the bug which I addressed for 5.4 in ERXEntity#hasExternalName (the
bug being introduced in 5.4) because it was mucking up my vertical
inheritance stuff by creating auto_pk entries for the subclass
instead of the parent so that the pks were not unique across the VI
tree.
Single table requires it also ... You have to declare an external name
on your abstract superentity or it will cause problems. Unfortunately,
the 5.4 fix you're referring to actually ended up causing some other
problems, but all of that has since been cleaned up to be much more
straightforward (read: "less guessy") in the future.
(Abstract btw, for clarify, has nothing to do with whether or not
the entity maps to a table but whether or not it can be instantiated).
In FB, you can't have a sequence that stands on its own -- it has to
be associated with a table, which is why your abstract superentity has
to have an external name, because you can't just make a sequence
without also having the table exist.
the SQL generated by EOF will only use the table for the abstract
entity ServiceUnit in the where clause and ignore the tables of the
concrete entites:
<com.webobjects.jdbcadaptor._FrontBasePlugIn$FrontbaseExpression:
"SELECT t0."id", t0."login", t0."serviceUnitID" FROM "User" t0
INNER JOIN "ServiceUnit" T1 ON t0."serviceUnitID" = T1."id" WHERE
(t0."login" = 'foo' AND T1."name" = 'provider')">
In this case you will need to first fetch the ServiceUnit and then
pass it in the qualifier.
Perhaps that's because EOF is confused by the mis-modelling.
This one sounds familiar, but I almost never use horizontal ... Please
log a radar for this.
ms
_______________________________________________
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