• 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
Fetching from related object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fetching from related object


  • Subject: Fetching from related object
  • From: Randall Perry <email@hidden>
  • Date: Fri, 23 Apr 2004 18:54:37 -0400

I'm using a Direct Action to do fetches for customer login. Have one fetch
working successfully, which fetches the customer record given the userName
and passWord:

EOQualifier qual = EOQualifier.qualifierWithQualifierFormat("userName = '" +
userName + "' and password = '" + passWord + "'", null);
EOFetchSpecification custFetchSpec = new EOFetchSpecification("CustView",
qual, null);
custInfo = ec.objectsWithFetchSpecification(custFetchSpec);


Went to add a second fetch which grabs log entries for the past year by
joining on custNo:

qual = EOQualifier.qualifierWithQualifierFormat("custNo = '" +
custInfo.custNo() + "' and dateTime > '" + dateOneYearAgo, null);
EOFetchSpecification logFetchSpec = new EOFetchSpecification("CustView",
qual, null);
logInfo = ec.objectsWithFetchSpecification(logFetchSpec);

Then I realized that custNo is a hidden key in EOModeler for both entities,
so this can't be done without making the keys visible.

There is a to-one relationship defined in EOModeler between the Log and
CustView entities.


How would I do the logInfo fetch above without making the keys visible?


--
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Fetching from related object
      • From: Arturo PĂ©rez <email@hidden>
    • Re: Fetching from related object
      • From: Art Isbell <email@hidden>
    • Re: Fetching from related object
      • From: David LeBer <email@hidden>
    • Re: Fetching from related object
      • From: Deirdre Saoirse Moen <email@hidden>
  • Prev by Date: Re: [Newbie] Setting default page
  • Next by Date: Re: Fetching from related object
  • Previous by thread: Re: [Newbie] Setting default page
  • Next by thread: Re: Fetching from related object
  • Index(es):
    • Date
    • Thread