it worked by running the query locally first, so the required index can get automatically created.
Thanks a lot, Steve www.sprosys.com On Sep 21, 9:44 pm, "Jason (Google)" <[email protected]> wrote: > Read more on indexes > here:http://code.google.com/appengine/docs/java/datastore/queriesandindexe... > > For more complex queries, you may have to define an index. If you run your > application in the local development server, it should generate the needed > index for you, then when you deploy your application, your index should > automatically start building. You can check this by clicking "Indexes" in > your app's Admin Console. > > - Jason > > On Fri, Sep 18, 2009 at 11:47 AM, sprooooz <[email protected]>wrote: > > > > > > > Thanks for your answers guys, > > > actually I ran the exact same query as you bcottam, but as soon as I > > add other parameters in the query(like "&& field1==param1"), a > > DatastoreNeedIndexException is thrown every time. > > any idea why? > > > On 18 sep, 16:56, bcottam <[email protected]> wrote: > > > I do this quite a bit in my app. > > > Basically I make a query like this: > > > Query q = pm.newQuery(MyClass.class, "myDate >= :firstDateParam && > > > myDate <= :secondDateParam"); > > > Map<String, Object> params = new HashMap<String, Object>(); > > > params.put("firstDateParam", startDate); > > > params.put("secondDateParam", endDate); > > > q.executeWithMap(params); > > > > I typed this on my phone, so I may have bitchered some meathod > > > signatures, but this is about what I am doing. Hope it helps. > > > > On Sep 18, 12:44 am, sproooooz <[email protected]> wrote: > > > > > I am trying to write a JDO query where an entity field java.util.Date > > > > "DATEFIELD" is between 2 others java.util.Date parameters...but can > > > > not succeed > > > > Has anybody tried this before? > > > > > that would be a big help.... > > > > > Steve --~--~---------~--~----~------------~-------~--~----~ 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=en -~----------~----~----~----~------~----~------~--~---
