Q:

GWT RPC and persistent Java objects

First of all,
many thanks to Craig for the excellent answer below which I found very useful when searching my original issue...
ref: GWT Simple RPC use case problem : Code included
Building on this solution, how does one overcome the (seemingly GWT limitation) where if i leave my persistable object in /shared folder as Craig suggests... and annotate it as GWT tutorials suggest...
@PersistenceCapable
public class Employee {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

GWT is seemingly unable to deal with  / import the com.google.appengine.datastore.key on the client side?
I have seen a few ugly hacks...but nothing elegant.
Any suggestions welcome,
Thanks

A:

Unfortunately, App Engine's Key class (and others) are not GWT-compatible. This means that you have to retrieve an object from the datastore, then translate it into a GWT-compatible POJO to send over GWT-RPC to the client.
I suggest looking into using the objectify framework for App Engine. Not only is it a much simpler interface into the datastore, but the persistent objects it uses are GWT-compatible, so you can send them over GWT-RPC to your client.

