• 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: Single-table inheritance and deep fetch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Single-table inheritance and deep fetch


  • Subject: Re: Single-table inheritance and deep fetch
  • From: Mike Schrag <email@hidden>
  • Date: Mon, 26 Sep 2005 10:11:50 -0400

If you open up B.plist inside the eomodeld folder, is there a "parent = A;" line inside of that?

On Sep 26, 2005, at 10:09 AM, Daniel Eggert wrote:

Well, the SQL I get has
withBindings: 1:"A"(type)
so it only gets the "A" objects, not the "B" ones. None of the two (neither A nor B) are marked abstract. Do they have to? I want to instantiate both A and B.


/Daniel

On Sep 26, 2005, at 3:09 PM, Ken Anderson wrote:


Dan,

It should definitely work. Have you looked at the SQL to see what the fetch looks like? Are either entity marked as abstract?

Ken

On Sep 26, 2005, at 8:59 AM, Daniel Eggert wrote:



Hi,

I can't get a deep fetch to work with single-table inheritance.

I have a class A / entity A and class B / entity B. For my single- table inheritance I have a 'type' attribute that is set to either 'A' or 'B'.

Class B inherits from class A, i.e. A is the parent of B.

If I do a deep fetch on A, I'd expect the objects of class B also to be returned. But that does not happen.


String entityName = "A";
EOFetchSpecification aFetchSpecification;
aFetchSpecification = new EOFetchSpecification(entityName, (EOQualifier) null, null, true, true, null);
EODatabaseDataSource dataSource = new EODatabaseDataSource (editingContext(), entityName);
dataSource.setFetchSpecification (authorsAndReadersFetchSpecification);


The data source only contains objects with type = "A". How do I get both "A" and "B" in one dataSource?

/Daniel



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden







_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com


This email sent to email@hidden


_______________________________________________ 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: Single-table inheritance and deep fetch
      • From: Daniel Eggert <email@hidden>
    • Re: Single-table inheritance and deep fetch
      • From: Daniel Eggert <email@hidden>
References: 
 >Single-table inheritance and deep fetch (From: Daniel Eggert <email@hidden>)
 >Re: Single-table inheritance and deep fetch (From: Ken Anderson <email@hidden>)
 >Re: Single-table inheritance and deep fetch (From: Daniel Eggert <email@hidden>)

  • Prev by Date: Re: Single-table inheritance and deep fetch
  • Next by Date: Re: Single-table inheritance and deep fetch
  • Previous by thread: Re: Single-table inheritance and deep fetch
  • Next by thread: Re: Single-table inheritance and deep fetch
  • Index(es):
    • Date
    • Thread