Re: [google-appengine] Query Embedded entities

2013-05-07 Thread xybrek
Jeff, not sure if I can take the approach you said to make a Annotation interface, as the object i try to store in the datastore is a Map, more specifically JSONObject, it my library binds JSON String, Number, Boolean, List and Map directly to Entitiy and EmbeddedEntity... On Sunday, May 5, 201

Re: [google-appengine] Query Embedded entities

2013-05-05 Thread Jeff Schnitzer
No, I mean make up a field in your POJO that _is_ indexed and automatically populate it with the value you want to index. A very crude example is something like this: class Person { // ... String name; @Index String nameNormalized; public void setName(String value) { name = val

Re: [google-appengine] Query Embedded entities

2013-05-04 Thread xybrek
Ok I see, when you say synthetic index, do you mean create a Index kind on a different namespace? Xybrek On Sunday, May 5, 2013 1:42:55 PM UTC+8, Jeff Schnitzer wrote: > > EmbeddedEntity fields are not indexable. This is mentioned in the javadocs: > > > https://developers.google.com/appengine/do

Re: [google-appengine] Query Embedded entities

2013-05-04 Thread Jeff Schnitzer
EmbeddedEntity fields are not indexable. This is mentioned in the javadocs: https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/EmbeddedEntity This doesn't prevent you from making your own synthetic index in the top-level Entity though. Jeff On Sat, Ma

[google-appengine] Query Embedded entities

2013-05-04 Thread xybrek
I have few question regarding Query'ing EmbeddedEntity with GAE datastore: - Is EmbeddedEntity query-able? and Index-able? - If so, then how to index such embedded entity? - Does Query, query Filter works with EmbeddedEntity - And that can we build queries that query Entity then filter