• 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: Re: Flattened relationship and iterator oddness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Flattened relationship and iterator oddness


  • Subject: Re: Re: Flattened relationship and iterator oddness
  • From: Peter <email@hidden>
  • Date: Tue, 19 Sep 2006 20:20:58 -0400

I have a similar problem trying to use a flattened relationship in my
WOUnitTesting.

I have this:

Study <->> StudyPeriod <->> StudySchedule

My flattened relationship periodSchedules is defined in my EOModel for
Entity Study as studyPeriods.studySchedules named "studySchedules".

I create the study, its periods and the periods' schedules using
WOUTMockEditingContext and the createSavedObject and
addRelationshipToBothSides... methods.  All works fine when I
enumerated over the realtionships.  It passes all of my tests for
custom methods I have.  However, whenever accessing my flattened
relationship ("studySchedules"), rather than enumerating over the
to-many relationships, the result is always an empty array.

I am not sure if this is related to the faulting of flattenen
relationships or something specific with using the
WOUTMockEditingContext (not the newest version WOUT2)

Any ideas?  Should I just stick to enumeration?  It would just be nice
to be able to use the "shortcut" when I need it.

Thanks,

Pete



On 9/10/06, shaun <email@hidden> wrote:
Hey Fabian,

Fabian Peters wrote:
> Hi John, hi Jean-Pierre,
>
> thanks for your replies!

[snip]

> I'm still wondering about this one:
>
>>>>     Order <->> OrderItem <<->> ProductionRun <-> DeliveryDefect
>>>>
>>>> In Order, I've defined a flattened relationship deliveryDefects. It
>>>> works fine for deliveryDefects that exist when the order is fetched
>>>> from the DB. However, it fails to include a deliveryDefect that is
>>>> created and then saved to the DB. Is this a known limitation of
>>>> flattened relationships?
>
>
> Is this behaviour to be expected? Is this documented anywhere? I
> couldn't find an awful lot of documentation on flattened  relationships
> anyway.
>

Yes its expected, at least, I would expect it. When I did the WOII
course in 2001 I think it was mentioned as a reason to not use flattened
relationships, amoung other more obvious reasons. I have not seen any
documentation about it though that I can remember. Perhaps searching the
omnigroup list archive would give you more info.

cheers,
  - shaun







 _______________________________________________
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

_______________________________________________
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: Flattened relationship and iterator oddness
      • From: Christian Pekeler <email@hidden>
References: 
 >Re: Flattened relationship and iterator oddness (From: Jean Pierre Malrieu <email@hidden>)
 >Re: Flattened relationship and iterator oddness (From: Fabian Peters <email@hidden>)
 >Re: Flattened relationship and iterator oddness (From: shaun <email@hidden>)

  • Prev by Date: Re: MS SQL Server Unicode Support
  • Next by Date: Re: Session timeout and memory
  • Previous by thread: Re: Flattened relationship and iterator oddness
  • Next by thread: Re: Flattened relationship and iterator oddness
  • Index(es):
    • Date
    • Thread