Chapter 22. Reverse Engineering in Cayenne Modeler

Table of Contents

DataSource selection
Reverse engineering options

Alternative aproach to using cdbimport is doing reverse engineering from Cayenne Modeler. Currently modeler GUI doesn't support all features of ant/maven tasks but it suffice for general DB import. Especially it's a good place to quickly start working on your data model.

You can find reverse engineering tool in main modeler menu Tools > Reengineer Database Schema

DataSource selection

First you should select DataSource. If you don't have any DataSource yet you can create one from this menu.

Datasource selection dialog

Datasource selection dialog.

Reverse engineering options

Once DataSource is selected you can proceed to reverse engineering options.

Reverse Engineering dialog

Reverse Engineering dialog.

Here is a list of options to tune what will be processed by reverse engineering:

  • Select Catalog: catalog to process


    You can only select one catalog. If you need to import multiple catalogs you need to run process several times.

  • Table Name Pattern: RegExp to filter tables. Default pattern .* includes all tables.

  • Procedure Name Pattern: RegExp to filter procedures. Default pattern .* includes all stored procedures.

  • Naming Strategy: Currently there is only one naming strategy available. See ant/maven tools documentation for details about naming strategy.

  • Tables with Meaningful PK Pattern: Comma separated list of RegExp's for tables that you want to have meaningful primary keys. By default no meaningful PKs are created.

  • Use Java primitive types: Use primitive types (e.g. int) or Object types (e.g. java.lang.Integer).

  • Use old java.util.Date type: Use java.util.Date for all columns with DATE/TIME/TIMESTAMP types. By default java.time.* types will be used.