We were discussing that annotation in this thread:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/71e0e7ca92425ad/0f1d4d5cf52875cb?lnk=gst&q...@gwttransient+#0f1d4d5cf52875cb

The annotation only works if all your classes with all the relation
classes belongs to the GWT module and all of them are serializable by
GWT.
If you have class A which is not serializable by GWT and class B which
is serializable but has a relation to class A (through a field and
their corresponding getter and setters), no matter if you use the
GwtTransient annotation, the compilation will fail saying that class A
is not serializable or that it does not belong to the module and that
it cannot find the source code.

On 4 feb, 14:12, Christian Goudreau <[email protected]>
wrote:
> Huh, is that documented !? I don't understand why we didn't heard about this
> before.
>
> Christian
>
>
>
> On Thu, Feb 4, 2010 at 8:05 AM, Marcos Alcantara <[email protected]> wrote:
> > Hi Diego,
>
> > Are you sure of this?
>
> > It would be great to stop using a 3rd party lib to process all DTO´s.
>
> > Thanks!
>
> > Marcos Alcantara
>
> > On 4 fev, 08:07, Diego Lovison <[email protected]> wrote:
> > > In GWT 2.0.x you can use the annotations of the JPA and JDO without
> > > problems and without using any additional library. Your source code
> > > will be compiled normally. No exception (SerializableException) will
> > > occur.
>
> > > So what's the problem:
> > > In a relationship one-to-many, when the GWT tries to serialize this
> > > attribute that is a "List", will probably return an exception
> > > (LazyInitializationException). Return an attribute that has a
> > > relationship one-to-many is not good for various reasons, the
> > > principal is the performace.
>
> > > Solution
> > > Add the annotation @GwtTransient above in the attribute "List" and
> > > everything will work normally.
>
> > > Advantage:
> > > You use a native GWT solution to deal with this type of information.
> > > Decreases some jars in your application, and get 10 ~ 200ms each
> > > request.
>
> > --
> > 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%2Bunsubs 
> > [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