In the book Pro Web 2.0 Application Development with GWT
<http://www.amazon.com/Pro-Application-Development-Experts-Voice/dp/1590599853>
the
author don't use DTO. He *hack *some GWT classes to put null this relations
during serialization .

This is a good solutions because you don't duplicate your entities and don't
need frameworks (dozzer or gilead). The bad is obscure code, but whn you do
it is transparent for developers



2011/5/1 Celinio <[email protected]>

> OK.
> But if you look at this entity, it has a onetomany relationship (manytoone
> more exactly) and there is no DTO mapped to it :
>
> http://code.google.com/p/gwt-hardwarestore/source/browse/trunk/%20gwt-hardwarestore/HardwareStore_2/src/com/hardwarestore/vo/Purchase.java
>
> What do you think ?
>
> On Sun, May 1, 2011 at 4:49 PM, Ahmed Mohammed 
> <[email protected]>wrote:
>
>> You will be needing DTOs if in entities there are any one to many
>> relationships.Or if you have any lazy load defined for any
>> fields.Since GWT can't serialize those objects, it will throw unable
>> serialize exception when you try to pass the entities from server to
>> client.
>> -Ahmed
>>
>> On May 1, 3:34 am, Celinio <[email protected]> wrote:
>> > Hi,
>> > I need some clarification regarding the use of JPA entities within a GWT
>> > application.
>> > I have always read that you need to create a DTO for each entity that
>> you
>> > develop in a GWT application because of some serialization problem.
>> >
>> > But if you look at this skeleton for a GWT-JPA application, you will
>> notice
>> > that there are no DTOs !http://code.google.com/p/gwt-hardwarestore/
>> >
>> > So i am not sure what's really needed.
>> > Are DTOs really needed ?
>> > My GWT application uses the MVP Places and Activities pattern.
>> >
>> > Thanks for helping.
>>
>> --
>> 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.
>>
>>
>  --
> 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.
>

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