• 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
Prefetching relationship issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Prefetching relationship issue


  • Subject: Prefetching relationship issue
  • From: "Federico Hernandez" <email@hidden>
  • Date: Tue, 15 Jul 2008 12:06:53 -0500
  • Importance: Normal

I have some entities like:

Entity A (is abstract)

            Relationship A. Is many to many with Entity X and it has an intermediate Entity AX)

Entity B (is sub entity of Entity A)

            Relationship A (inherit)

            Relationship B

Entity C (is sub entity of Entity A)

            Relationship A (inherit)

            Relationship C

Entity D (is sub entity of Entity A)

            Relationship A (inherit)

            Relationship D

 

The Entity AX has something like this:

X_id      A_id

1                  1          Belongs to Entity B

2                  3          Belongs to Entity C

4         5          Belongs to Entity B

5         6          Belongs to Entity D

5         7          Belongs to Entity C

3         8          Belongs to Entity B

 

When I start my application, I fetch EO’s from entities B, C and D, pre-fetching its relationships.

 

I fetch Entity B and pre-fetch relationship A and relationship B. When the relationship A is pre-fetched, all the rows from Entity AX were fetched and the Database Context create Global ID’s for all of them (1,3,5,6,7,8) for Entity B, but some of them belong to entity C and D.

 

When I fetch Entity C and D, some EO’s has a Global ID of Entity B. The issue generate a NPE at Database Context when a fault at relationship C is solved. It’s because the Global ID for EO C is from Entity B not Entity C.

 

Does my model have something wrong?

How to solve it? Any ideas.

 

Regards

Federico

 

 _______________________________________________
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: Prefetching relationship issue
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: Re: processing incoming e-mails
  • Next by Date: OT:ReportMill ignoreMember?
  • Previous by thread: Re: Webobjects-dev Digest, Vol 5, Issue 761
  • Next by thread: Re: Prefetching relationship issue
  • Index(es):
    • Date
    • Thread