Generating tables (DDL scripts) from entities

Use this procedure to generate DDL script (for database tables) from your persistent entities. You must establish a database connection before generating DDL files.

  1. Right-click the persistent project in the Package Explorer and select Java Persistence > Generate DDL.

    Generating DDL from Entities

    Using the Java Persistence > Add Java Persistence menu option.
  2. Complete the information on each page of the .

    Refer to the "Using web tools" section of the Web Application Development Guide for additional information.

    Generate DDL – Options page

    This figure shows the Options page of the Generate DDL wizard.
  3. Complete the information on the page of the and click Next.

    Generate DDL – Objects page

    This figure shows the Objects page of the Generate DDL wizard.
  4. Complete the information on the page of the and click Next.

    Generate DDL – Save and Run page

    This figure shows the Save and Run page of the Generate DDL wizard.
  5. Review the information on the Summary page. If the information is correct, click Finish to generate the script. If not, click Back to change the necessary information.

 

Related task

Generating a DDL Script
Generating entities from tables

 

Related reference