Re: Strange error message
Anjo Krank <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Hi Chuck, >>> Ah Ha! I know the answer. EOs in an inheritance hierarchy MUST >>> MUST MUST have unique primary keys. That is the only way that EOF >>> can differentiate which class an object is. In your case >>> >>> RootClass ----> EntityA >>> ----> EntityB >>> >>> No object of EntityA, EntityB (or RootClass if not abstract) can >>> have the same PK. >> I don't understand that: AFAIK, a EOGlobalID contains nor only the >> PK, but also the entity. > > Not exactly. It has the *root* entity in the hierarchy. > >> So EOF should be able to get the correct object when you have >> horizonatl inheritance? > > EOF can always get the correct object provided that there are no > duplicate PKs anywhere in the hierarchy. > > >> Is this supposed behaviour or has anyone filed a bug report? > > It appears to me that this is by design, not a bug. Sorry, but to me this sounds like a bug: it means you can't have legacy databases which have horizontal inheritance and a common set of PKs - which sounds like a pretty severe restriction to me. Also, I see no reason why the GlobalID should contain the root entity and not the actual one.