Re: Strange error message
Chuck Hill <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Organization | Global Village Consulting, Inc. |
| Message-ID | <[email protected]> |
That is at least part of it. As the FrontBase sequences are tied to a table, a table *must* be created for the root entity even if it is abstract and will never have any rows in it. If this table is not created then there is no place for the UNIQUE sequence generator. If you try adding new EOs, EOF/FB will complain when it tries to generate a new PK. Chuck Camille Troillard wrote: > Hi Chuck, > > > On Tuesday, Oct 8, 2002, at 20:21 Europe/Paris, Chuck Hill wrote: > >> What database are you using? EOF with Oracle or FrontBase usually >> uses a sequence generator on (in your example) RootClass to generate >> the PK for objects at or below that root. You should be able to do >> the same thing. > > > I am using FrontBase. > I now realize that I have not assigned external entity names to entities > like "RootClass". > Do you think it could be the root of my problem? > > Camille > > > > >> Camille Troillard wrote: >> >>> Chuck, that's it! >>> Now I perfectly understand because my model used to work when I was >>> using unique PKs. >>> I guess I must rollback to the first implementation ... and find a >>> way to generate PK shorter than the default implementation. >>> Thanks to everybody that helped me to solve the problem!!! >>> Camille >>> On Tuesday, Oct 8, 2002, at 19:59 Europe/Paris, Chuck Hill wrote: >>> >>>> 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. If EOF fetches an instance of EntityA with a PK >>>> of 1000, and then fetches an instance of EntityB with a PK of 1000 >>>> it will think (because the EOGlobalID is the same) that the EntityB >>>> instance is actually the EntityA instance. >>> >> >> >> -- >> >> Chuck Hill [email protected] >> Global Village Consulting Inc. http://www.global-village.net >> >> >> > > _______________________________________________ > EOF mailing list > [email protected] > http://www.omnigroup.com/mailman/listinfo/eof -- Chuck Hill [email protected] Global Village Consulting Inc. http://www.global-village.net