On 06/02/2009, at 3:03 AM, Don Lindsay wrote:

When I use objectsWithFetchSpecification to retrieve an Array of User objects. (I setEntity("Users") and setIsDeep(true)).

@see EOFetchSpecification#setIsDeep.
This is not doing what you're looking for. i.e., you're not using inheritance from your description - but a relationship.

The Relationships in the Users object are not fetched. I believe this is due to faulting by EO.

Lazy faulting is default behaviour, correct.

I would like to retrieve the top level relationships in the object without the EO having to make a round trip to the database, at a later time. Is there a way to pull the top level relationships in an Entity, or specify if I want to go deeper into the relationship model?

to use the example of users.

User Entity:
  Username attribute: String
  Password attribute: String
  Person attribute: Person EO Object

What I want to do is fetch all users and ensure that the Person object is fetched when I receive the Array of EOs back from objectsWithFetchSpecification.

fetchSpec.setPrefetchingRelationshipKeyPaths(new NSArray<String>("person"));

with regards,
--

Lachlan Deck

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to