Thanks for the reply.
Yes I have tried this, with a query.declareParameters() in the middle.


On Nov 12, 8:55 pm, m seleron <[email protected]> wrote:
> Hi,
>
> Query query = pm.newQuery(CurrencyPair.class);
>
> query.declareParameters("String currency_name");
> query.setFilter("currencyPair== currency_name");
> String currency_name = "AUD.USD";
>
> List<CurrencyPair> l = (List<CurrencyObj>)query.execute
> (currency_name);
>
> It is likely already to have tried.
> thanks.
>
> On 11月12日, 午後5:18, David Brown <[email protected]> wrote:
>
> > Have you tried using an outside tool like TOAD or DBVIS to run your query
> > first as a test? Or can you JUnit your query?
>
> > On Thu, Nov 12, 2009 at 2:11 AM, dukha <[email protected]> wrote:
> > > I have a pojoCurrencyPairwhich I have successfully saved in the
> > > database using jdo.
> > > CurencyPair has a fieldcurrencyPair.
>
> > > Now trying to select in jdo the query works fine so long as there are
> > > no conditions/filters involved. ie I can select all currency pairs
> > > like this
>
> > > PersistenceManager pm= getPersistenceManager();
> > > Query query = pm.newQuery(CurrencyPair.class);
> > > List<CurrencyPair> l = (List<CurrencyPair>)query.execute();
>
> > > This gives
> > > USD.JPY
> > > GBP.JPY
> > > EUR.GBP
> > > EUR.USD
> > > USD.CAD
> > > AUD.USD
> > > USD.CHF
> > > EUR.JPY
> > > EUR.CHF
> > > GBP.USD
>
> > > PersistenceManager pm= getPersistenceManager();
> > > Query query = pm.newQuery(CurrencyPair.class,"currencyPair==
> > > 'AUD.USD'");
> > > List<CurrencyPair> l = (List<CurrencyPair>)query.execute();
>
> > > returns  no data.
>
> > > I've tried all all combinatioins of setting a filter and declaring a
> > > parameter or putting the whole query in 1 String according to the gae
> > > getting started guide.
> > > I have no idea what I'm doing wrong. any help would be appreciated.
>
> > > Thanks.
> > > Dukha
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine-java%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=.

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=.


Reply via email to