Hi Guys,

[i had started with cloning client/server types so i think i'll try
and get this version working before refactoring to use objectify]

I was just wondering (Didier), when retrieving from datastores, how do
you normally deal with casting/converting your returned datastore
objects to the client side type..

e.g.
1. client makes call to get all employees
2. server retrieves all persistent Employees from Datastore .....

3. would you convert returned objects to the GWT friendly type on the
server before returning them to the client?


Thanks,

On Oct 8, 8:51 pm, William Shatner <[email protected]> wrote:
> Many thanks for the replies lads...
>
> On Fri, Oct 8, 2010 at 18:17, David Chandler (Google) <
>
> [email protected]> wrote:
> > Have a look at GILEAD for JPA / JDO on App Engine:
> >http://turbomanage.wordpress.com/2009/10/15/gwt-gae-and-the-balm-of-g...
>
> > Also, Objectify-appengine provides emulation for Key and related
> > classes so that POJOs can be used with GWT.
> >http://code.google.com/p/objectify-appengine/
>
> > HTH,
> > --
> > David Chandler
> > Developer Programs Engineer, Google Web Toolkit
> > Atlanta, GA USA
>
> > On Oct 7, 3: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]<google-web-toolkit%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
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.

Reply via email to