Vaadin/Eclipse/Hibernate - getting started..

I am new to Vaadin, and have almost no experience with Eclipse, so perhaps someone can help me get started…

I have managed to build a couple of Vaadin projects using the SQLContainer and a MySQL database. Now I want to use the JPAContainer with Hibernate, but I can’t seem to get started.

I installed the Hibernate Tools into Eclipse, but I can’t seem to create both a JPA project and a Vaadin project simultaneously. And in a Vaadin project, I can’t figure out how to configure Hibernate at all. I have used Hibernate before, but I did it with the Netbeans IDE, which hid most of the details from me. I would like to be able to create a Hibernate environment, and then automatically create the entity classes from the database tables.

Can someone point me at a tutorial that will walk me through the steps needed, or a sample program that I can download and examine? Is it possible to do what I’m trying to do or do I have to do all the configuration and class construction manually?

thanks,

nbc

Well, after lots of experimenting, I have managed to create some java entity classes, and I was able to create a JPAContainer that reads some of my data using Hibernate. But I have several questions…

  1. Once the JPAContainer is loaded, it looks to me like I still need to call getItem() and then getItemProperty() to manually construct (or reconstruct) one of my Java Entity objects. Is that correct or am I missing a simpler approach? If I need to call getItem() etc. then what is the advantage of the JPAContainer over a simple SQLContainer?

  2. I am getting errors that include “failed to lazily initialize a collection of ”. It looks like my hibernate sessions are being released. I could use some pointers to code that manages a collection of java objects with Hibernate in the Vaadin environment…

thanks,

nbc