• 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: EOQualifier for an optional to many relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier for an optional to many relationship


  • Subject: Re: EOQualifier for an optional to many relationship
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 05 Oct 2015 16:54:28 +0000
  • Thread-topic: EOQualifier for an optional to many relationship

"fetch all As that are either assigned to a given B or not assigned at all”.   That sounds like a right outer join.  You can set the join semantics on the relationship in EOModeler.  You probably don’t want that for the main relationship, but I think you can define one that is not a class property and use that for the fetch.

Otherwise, I think you need a UNION.  I don’t recall that Wonder generates UNIONs, but there is a lot in there…

There might be some other combination of qualifiers that work, checking the generated SQL is the best way to get a view into why it is not working.

Chuck


From: <webobjects-dev-bounces+chill=email@hidden> on behalf of Markus Ruggiero <email@hidden>
Date: Monday, October 5, 2015 at 5:28 AM
To: WebObjects-Dev Mailing List List <email@hidden>
Subject: EOQualifier for an optional to many relationship

I have an optional many-2-many relationship between entities A and B. EntityModeler creates a join table with nothing modelled but the logical m:n relationships.

Now I need a qualifier to fetch all As that are either assigned to a given B or not assigned at all.

Following part works (finding all As assigned to a given B):

A.TO_MANY_B_ERXKEY.eq(myBObject)

Trying to find all As that have NO relationship to any B either finds nothing

A.TO_MANY_B_ERXKEY.isNull()

or results in a NullPointerException

A.TO_MANY_B_ERXKEY.isEmptyRelationship()

What am I missing here? In the end I want to simply join the two partial qualifiers by .or()

Thanks
---markus---

 _______________________________________________
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: 
 >EOQualifier for an optional to many relationship (From: Markus Ruggiero <email@hidden>)

  • Prev by Date: Re: Abandonware???
  • Next by Date: Re: ERMailDeliveryHTML outside the RR-Loop
  • Previous by thread: EOQualifier for an optional to many relationship
  • Next by thread: Adaptor Zapped
  • Index(es):
    • Date
    • Thread