Using Grails ORM for Vaadin application
We will create a simple application that will have access to the database. In the database, there will be one entity, User. A visitor of our application will see the list of the users fetched from the database (it is going to be two women's names, Sara and Ester).

How to do it…
Carry out the following steps in order to connect a Vaadin application with the database in a Grails environment:
First, we need to make a new domain class named
User
. This class will be placed inside the domain folder.A new dialog window appears and we just type in
user
. The package name is automatically taken from the name of the project. If we want to specify a different package name, we just type the full name of the class, such asmycomp.User
.Alternatively, we can create the domain class from the Grails command line:
grails create-domain-class user
The
User
class has been generated into the domain folder inside thevaadin.grails.gorm
package. We will add a new field that...