Hi,
I set up a persistent class like this:
@PersistenceCapable
public class Farm
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key mKey;
}
I might send a representation of this object down to a client browser.
I imagine it could be in JSON format. How can I include the mKey id so
that the client can interact with the Farm instance later on? I see
Key has a method getId() which returns a long. Is this what we can
send down to the client? I basically want to expose a service like
this:
mysite.com/plowfarm?id=abc
so I need a way to get this particular Farm instance out of the data
store again from some random client, which will only know about
strings it reads from a JSON object:
String qs = "SELECT FROM org.myproject.farms.server.data.Farm WHERE
mKey == " + id;
Is that long id the answer to this?
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].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.