inheritance problem...
inheritance problem...
- Subject: inheritance problem...
- From: Tim Worman <email@hidden>
- Date: Mon, 28 Dec 2009 16:32:32 -0800
...or wondering if I've modeled something incorrectly.
I've got a model with these Entities:
Timesheet (abstract parent) >----------------- TimeEntry (just a time entry on a timesheet) TimesheetExempt (child) TimesheetNonExempt(child)
Everything works fine until a given TimeEntry tries to refer back to its timesheet by calling timesheet(). At that point I get this error:
Error: java.lang.IllegalStateException: The object with globalID _EOIntegralKeyGlobalID[Timesheet (java.lang.Long)10253] could not be found in the database. This could be result of a referential integrity problem with the database. An empty fault could not be created because the object's class could not be determined (e.g. the GID is temporary or it is for an abstract entity)
It is true that the GID would be for an abstract entity - Timesheet. But I assumed that a TimeEntry would not need to know specifically what variety of Timesheet it is dealing with. I guess the question I have is, what is the better way to model this? Will it be necessary for me to model TimeEntryExempt and TimeEntryNonExempt just so the time entries know which type of timesheet they belong to and don't call the abstract parent?
Tim UCLA GSE&IS
|
_______________________________________________
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