[appengine-java] Use Array as a query filter - possible?

2011-05-08 Thread mscwd01
Hey

I have an entity with an Int Array and I would like to perform a query
on the contents of the Array. For example, I would like to return
entities which have a certain number within the array, I.e.

Select * From MyObject Where numberArray contains 2

Is this possible in any way, shape or form?

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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Use Array as a query filter - possible?

2011-05-08 Thread Stephen Johnson
Yes it's possible. Make sure the property is indexed. From the data viewer
you can perform the following query for example:

select * from KIND where PROPERTY = NUMBER

How you do it in code depends on if you're using JDO, Objectify, JPA,
low-level API, etc.

On Sun, May 8, 2011 at 5:14 PM, mscwd01 mscw...@gmail.com wrote:

 Hey

 I have an entity with an Int Array and I would like to perform a query
 on the contents of the Array. For example, I would like to return
 entities which have a certain number within the array, I.e.

 Select * From MyObject Where numberArray contains 2

 Is this possible in any way, shape or form?

 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
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.



-- 
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Use Array as a query filter - possible?

2011-05-08 Thread Stephen Johnson
BTW, I'm assuming by Int Array you actually meant ArrayList or multi-valued
equivalent. Perhaps more info is needed for your particular situation and
why it seems you think it can't be done.

On Sun, May 8, 2011 at 5:41 PM, Stephen Johnson onepagewo...@gmail.comwrote:

 Yes it's possible. Make sure the property is indexed. From the data viewer
 you can perform the following query for example:

 select * from KIND where PROPERTY = NUMBER

 How you do it in code depends on if you're using JDO, Objectify, JPA,
 low-level API, etc.


 On Sun, May 8, 2011 at 5:14 PM, mscwd01 mscw...@gmail.com wrote:

 Hey

 I have an entity with an Int Array and I would like to perform a query
 on the contents of the Array. For example, I would like to return
 entities which have a certain number within the array, I.e.

 Select * From MyObject Where numberArray contains 2

 Is this possible in any way, shape or form?

 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
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.