I personally use the clone technique: i.e a simple pojo with no annotation.
You may later on face a second issue with your annotated objects if their methods use server side specific objects or methods: the emulated part of JRE in gwt is fairly small: see doc. so, separating client and server sides is probably better on the long run. didier On Oct 7, 9:19 pm, Will <[email protected]> wrote: > Hi, > > I'm constructing a POJO (Employee) on teh client side and trying to > make persistent in teh datastore. > So that both client and sever can see this class i place it in the / > shared folder and annotate the object as suggested by tutorials for > persistence... > > @PersistenceCapable > public class Employee { > @PrimaryKey > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > private Key key; > > etc. > > The problem as some of you are probably predicting is GWT (not Java) > throws an exception and cannot import com.google.appengine when it > tries to import the Key. > > the import com.google.appengine cannot be resolved > > I've seen various hacks and solutions around this issue in this > group, on forums and on blogs...none of which are too pretty... > > from super-src hack to maintaining client and server object clones.. > (double classes) and so on... > e.ghttp://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jd... > > Does this issue still require a 'hacky' solution or is there a more > elegant solution available now? > > Thanks... -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-web-toolkit?hl=en.
