• 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
Re: Problem with objectsWithFetchSpecification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with objectsWithFetchSpecification


  • Subject: Re: Problem with objectsWithFetchSpecification
  • From: Sacha Mallais <email@hidden>
  • Date: Thu, 8 Sep 2005 09:04:44 -0700

On Sep 8, 2005, at 12:21 AM, Ian Joyner wrote:

I'm having a strange problem fetching from tables using horizontal inheritance. I have a hierarchy with Skills_test at the root and subclasses Graded_test and Value_test. Doing a fetch on Skills_test, I expect all records in Graded_test and Value_test to be returned. I see the SQL on the server side and the report "9 row (s) processed, but get nothing on the server side:

NSArray /*[Skills_test]*/ tests = editingContext ().objectsWithFetchSpecification (new EOFetchSpecification ("Skills_test", null, null));

        System.out.println (".load_test_tree tt " + tests.count ());

Suspecting deep fetching, I changed this to just fetch on Graded_test:

NSArray /*[Skills_test]*/ tests = editingContext ().objectsWithFetchSpecification (new EOFetchSpecification ("Graded_test", null, null));

        System.out.println (".load_test_tree tt " + tests.count ());

again seeing that fetches are made to the database, but nothing actually returned.

I then changed the fetch spec to retrieve any other table in the database and I get the correct number of rows returned, so it seems to be something weird with the Skills_test hierarchy. Can anyone give a clue as to why this code is returning records from every other table in the database except the ones I want? I'm sure it's something strange in the model (parents are set correctly, abstract is only on for Skills_test), but have not been able to pinpoint what the problem is.

Are you using some form of single-table inheritance? If so, check that you have set the Restricting Value properly.



sacha


--
Sacha Michel Mallais President / Senior Developer
Global Village Consulting Inc. http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
Hi! I'm a signature virus. Copy me into your sig file and help me spread!



Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
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

References: 
 >Problem with objectsWithFetchSpecification (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: Fwd: Unable to write file (java file creation)
  • Next by Date: Re: Flash and WebObjects...Make it Work with XML or other ?
  • Previous by thread: Problem with objectsWithFetchSpecification
  • Next by thread: Re: Problem with objectsWithFetchSpecification
  • Index(es):
    • Date
    • Thread