Re: Filtering array returned by an EO's relationship (D2J)
Re: Filtering array returned by an EO's relationship (D2J)
- Subject: Re: Filtering array returned by an EO's relationship (D2J)
- From: Ricardo Strausz <email@hidden>
- Date: Mon, 3 Nov 2003 13:00:25 -0600
Sorry... I forgot you are dealing with a relation; in such a case, you
may prefere to use a
EODetailDataSource instead. You initialize it with:
ds = EODetailDataSource(theMasterDataSource, theKey);
To get theMasterDataSource, you can use the previous example.
HIH
Dino
On lunes, novi 3, 2003, at 11:39 America/Mexico_City, Ricardo Strausz
wrote:
Hola Ray!
There are, basically, two ways to get an EODatabaseDataSource:
* the ease, to ask for to a DisplayGroup (it may be a EODisplayGroup,
if you work with EOInterface, or a WODisplayGroup, in a WOApp); simply
ds = displayGroup.dataSource();
* the pro, to initialize it with
ds = EODatabaseDataSource(anEditingContext, anEntityName).
After you have one, simply use
ds.setFetchSpecification(aFetchSpecification);
ds.setAuxiliaryQualifier(aQualifier);
anArray = ds.fetchObjects();
Read:
file:///Developer/Documentation/WebObjects/Reference/API/index.html
(recall, EODataSource is defined in EOControl).
Suerte!
Dino
On sabado, novi 1, 2003, at 06:36 America/Mexico_City, Ray Ackland
wrote:
Dino,
Ok. I give up. I have been reading through the API doc's, and
generally going around in circles. I would like to have a go at using
the auxiliary qualifier, but from what I have learnt, I first need to
get hold of the EODatabaseDataSource in question.
And I believe I can get that from the
WOToManyRelationship.datasource() method. But how do I get the
WOToManyRelationship?
I see I can get an array of to-many relationships, but this is not
necessary as I already know the key for the relationship I want. But
how do I get that relationship from that key?
Please point me in the right direction. As usual, the answer will be
obvious once I know what it is.
Ray.
On Wednesday, Oct 29, 2003, at 07:34 Pacific/Auckland, Ricardo
Strausz
wrote:
Did you try dataSource.setAuxiliaryQualifier(aQualifier);
_______________________________________________
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.
_______________________________________________
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.