• 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
QueryBindings, Datasource and/or FetchSpecifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QueryBindings, Datasource and/or FetchSpecifications


  • Subject: QueryBindings, Datasource and/or FetchSpecifications
  • From: James Cicenia <email@hidden>
  • Date: Wed, 8 Feb 2006 21:18:00 -0600

Hello -

Well I have finally figured out how to save and retrieve my queryBindings. Thanks to Travis Cripps I learned that the draggable component, D2WQuery, isn't able to give QueryBindings back. However, when I subclassed and integrated D2WQueryPage everything quickly fell in place at which point Anjo's suggestion of ERD2WQueryPage become very useful.

So now my question is, how do run a query directly with my stored dictionary of QueryBindings?

I tried the following but to no avail:

public EODataSource queryDataSource(String entityName) {
EODataSource ds = null;
if (ds == null || !(ds instanceof EODatabaseDataSource)) {
ds = new EODatabaseDataSource(session ().defaultEditingContext(), entityName);
((EODatabaseDataSource)ds).setQualifierBindings (((NSDictionary)((Session)session()).reportQueryDict()));
}
EOFetchSpecification fs = ((EODatabaseDataSource) ds).fetchSpecification();


fs = fs.fetchSpecificationWithQualifierBindings (((NSDictionary)((Session)session()).reportQueryDict()));
return ds;
}


I would then use something like:

queryDataSource(selectedReport.reportEntity()).fetchObjects()

This however always returns all objects as if no qualifier exists.

Any hints, suggestions or solutions would be greatly appreciated again.

Thanks,
James Cicenia

_______________________________________________
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


  • Prev by Date: Re: SQL?
  • Next by Date: Re: Accessing the session in WOLongResponsePage.performAction
  • Previous by thread: Re: SQL?
  • Next by thread: Seeking Advice for Getting Started
  • Index(es):
    • Date
    • Thread