• 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
EOF issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOF issues


  • Subject: EOF issues
  • From: "M.Y. Tjoe" <email@hidden>
  • Date: Wed, 29 Apr 2009 12:31:10 +1000

Hi all,

I am currently investigating an interesting problem. Here is the problem description:

A database table "Person" is represented in EOModel as "Person" with 3 childs "Staff" , "Student", "External". There is type column in Person to tell if he is staff/student/external.

The problem is that when a "External" object is fetched into a ec, changed its type to "student" and saved changes,

i.e.

External external = External.fetchExternal(ec, External.ID_KEY, '12345');
external.setType("student");
external.editingContext().saveChanges();


then in the same ec (or different ec) the now "student" still being recognized as External somehow.

When you do

Student student = Student.fetchRequiredStudent(ec, Student.ID_KEY, '12345');
or even
Person student = Person.fetchRequiredPerson(ec, Person.ID_KEY, '12345');


An databaseContextFailedToFetchObject exception is thrown.

I am thinking the objects graph is now broken because Staff Object supposed to be vanished from the graph but it didn't.

Any idea??

Regards,
Harvey

_______________________________________________
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:
    • Re: EOF issues
      • From: Chuck Hill <email@hidden>
    • Re: EOF issues
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Entity Modeler
  • Next by Date: Re: EOF issues
  • Previous by thread: Entity Modeler
  • Next by thread: Re: EOF issues
  • Index(es):
    • Date
    • Thread