Fetching from related object
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.