You should be able to query for a null value, but you will not be able to query for an empty value. What is the query you are issuing? What is this returning?
On Wed, Dec 23, 2009 at 8:29 AM, dantuluri <[email protected]> wrote: > I am new GAE and I need some help. Is it possible to query for > entities with a property value null using GAE JDO query? > > I want something like > > "Get me all the Files that don't have a parent" > > In regular relational DBs, it can be queried some thing like this: > "select * from File where parentKey is null" > > I have a class something like this: > > public class File { > @Persistent > @PrimaryKey > private Key id; > > @Persistent > String name; > > @Persistent > private Key parentKey; > } > > When I am querying for Files that have null parentKey, query returns > all Files including those with non-null parentKey value. Is this > possible to do with GAE? > > Thanks! > > On Dec 22, 1:33 pm, dantuluri <[email protected]> wrote: > > Hi, > > > > I have an entity that has the following structure: > > > > File which has Key as primary key and ParentKey that refers to > > another File which is parent of this File. Example data for this > > structure looks like this: > > > > Key: File(2) > > Name: Inbox > > parentKey: File(1) > > > > It is possible that File may not have a parentKey. > > > > I want to query the DataStore for Files that don't have parent file > > (parentKey == null). But when I am querying with parentKey == null, I > > am still getting all Files including those with parentsKeys. How can > > we do this with JDO query with App Store? I must be missing something > > basic here. > > > > Similarly I would like to get the child folders of a given folder > > (parentKey == File(1)). > > > > Any help would be appreciated! > > > > Thanks > > -- > > 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=en. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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.
