Hi David, We have been working GWT and Hibernate in most web apps we do.
In the past we have simply wrote our own DTO to Persistent copying code (Your option 3) but a lot of people have recommended hibernate4GWT to take the pain out of doing this. This was complicated at the time and we had to write some complex graph walking algorithms and aim to avoid any 'cicular references' so that our code didn't get stuck in a loop initialising objects. Also we began GWT and Hibernate development before GWT introduced version 1.5 so we didn't have the option of using Java Generics and strongly typed sets etc which meant we had to use Persistent objects and GWT serializable client side objects. (We do our mapping using Hibernate Annotations) I'm wondering now whether the simplest option would be to include your persistent objects on the client side (GWT has the clause that any client side code must be under the package contains 'client') and make them serializable then you can reference them from both the server and client side as you mention in option 2. You have to make sure that any queries you run initialise all the objects you're going to need for example: from myPersistentObject as pojo left join fetch pojo.collectionOfOtherObjects as coll where coll.someValue = :whatever In the previous example I left joing fetch my collection of other objects because I know I'm going to use them in the client side code. We have found you need to do this otherwise you hit LazyInitialization exceptions further on. As we've not started a new project (and haven't upgraded our legacy projects ) to GWT 1.5 I can't share any experience on simply making the persistent objects Serializable but I can't see it being to big an issue? Please anyone correct me of course?! Thats my initial thoughts anyway... On Nov 5, 9:44 pm, "David Durham, Jr." <[EMAIL PROTECTED]> wrote: > Hi all, > > What's the state of things with Hibernate and GWT 1.5. I've done some > quick googling and I see reference to the following: > > 1 - hibernate4gwt > 2 - Making hibernate "persistent" collections GWT serializable > 3 - Just writing your pojo copy utility perhaps using beanlib > > I'm wondering if there is one route that is the preferred/recommended > way to go with this issue. > > Thanks in advance, > Dave --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
