Looking at the low-level code it appears that your versions are stored as Strings. My guess is that your JDO query is treating the parameter "0.2" as a double rather than as a string. That would certainly explain why you're not getting any results. If you can post a boiled down version of your JDO code I can help determine if this is an issue with your code or the JDO implementation.
Max On Fri, Sep 4, 2009 at 4:01 AM, Cornel <[email protected]> wrote: > > Hello! > > I have some objects in the database that have a String property called > version. > Some of them have version = '0.2', the others have '0.0' > > I have an application written in java. > When i query for an object with version 0.2 with the low level api it > works (it finds 62 obejcts) > > DatastoreService ds = > DatastoreServiceFactory.getDatastoreService > (); > Query q1 = new Query("DbRawContact"); > q1.addFilter("version", FilterOperator.EQUAL, > "0.2"); > PreparedQuery pq = ds.prepare(q1); > log.info("remainging: " + pq.countEntities()); > > When i query with JDO the query doesn't fetch anything! > > I won't post the JDO query here, because i actually use a wrapper > around it (too many lines to post here); but i'm 99.99% sure that code > is correct because it works for a version = '0.0' query with no > problems! (and for all other queries that i'm doing with it) > > I even tried to fetch one of those "version 0.2" objects using a > different property; was succesful, so then i tried a consecutive query > with "version = fetchedObject.getVersion()". No results! What gives? :( > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
