• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
inheritance problem...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Happy New Year
      • From: Ken ISHIMOTO <email@hidden>
    • Re: inheritance problem...
      • From: email@hidden
  • Prev by Date: Re: Book recommendations
  • Next by Date: Re: inheritance problem...
  • Previous by thread: Code sample from Prof. WO 5 with Java
  • Next by thread: Re: inheritance problem...
  • Index(es):
    • Date
    • Thread