O'Reilly logo

Java EE 6 Development with NetBeans 7 by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Automated Generation of JPA Entities

In many projects, we will be working with an existing database schema created by a database administrator. NetBeans can generate JPA entities from an existing database schema, saving us a lot of potentially tedious work.

In this section, we will be using a custom database schema, in order to create the schema, we need to execute an SQL script that will create the schema and populate some of its tables. In order to do this, we need to go to the Services window, right-click on JavaDB, then select Create Database....

Automated Generation of JPA Entities

We then need to add the database information in the Create Java DB Database wizard.

At this point, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required