Well, apparently the author created a class, HibernateFilter.java, that acts as a filter during the GWT serialization of objects.
http://tocollege-net.googlecode.com/svn/ProGWT/trunk/src/main/java/com/apress/progwt/server/gwt/HibernateFilter.java
It converts Date objects, PersistentSet collections etc.
Not sure what it's worth actually.
Has anyone used such approach ?
On Sun, May 1, 2011 at 8:52 PM, Juan Pablo Gardella <gardellajuanpablo@gmail.com> wrote:
In the book Pro Web 2.0 Application Development with GWT 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 <cel975@gmail.com>--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 <ahmedmohiuddin@gmail.com> 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 <cel...@gmail.com> 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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment