I am a first-timer for this and want to possess some guidance concerning how to store objects inside a database..

I've an item Person, with a few fields inside it. I've one PersonContainer which loads all of the objects in the database.

What's better of both of these: (or maybe both of them suck, let me know what is the right factor to complete)

Keep object just like a XXX.store(new Person())

or

Keep object as with XXX.store(new BeanItem<Person>(new Person()))?

What is "sound practiceInch to complete?

My recommendation is always to persist Business objects i.e. objects that represent a company idea of your unique domain, inside your situation Person, etc.

Really, I would recommend to take a look in the Adding JPA to the Address Book Demo page within the Vaadin wiki, you will probably find some helpful information there.

I'd also suggest to persist Person. The BeanItem class can be used by Vaadin because of its own reasons (binding etc) so there's pointless to persist individuals "vaadin reasons" :)

SC