Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Texo/ORM JPA Options"

(ORM/JPA Options)
(ORM/JPA Options)
 
Line 25: Line 25:
 
* '''Enforce Unique Names''': if types/eclasses have the same name potentially naming collisions can occur, flagging this option will prefix all entity (and table) names with the epackage name space prefix.
 
* '''Enforce Unique Names''': if types/eclasses have the same name potentially naming collisions can occur, flagging this option will prefix all entity (and table) names with the epackage name space prefix.
 
* '''Renamed sql reserved words''': if flagged then column and other database schema names which are a reserved word for sql are renamed/prefixed.
 
* '''Renamed sql reserved words''': if flagged then column and other database schema names which are a reserved word for sql are renamed/prefixed.
* '''Generate all DB schema names''':
+
* '''Generate all DB schema names''': if checked then Texo will generate all the relevant ORM/JPA annotations to fully map the columns and tables with full naming choices.
 +
* '''Maximum sql name length''': a number, if set or higher than zero then Texo will truncate table and column names which are longer than this value.
 +
 
 +
Note that these option only apply if no [[Texo/ORM_JPA_Annotations_Details|Orm annotation]] is present on EPackage level.

Latest revision as of 09:15, 31 May 2012

Introduction

The Texo ORM generation can be controlled through global options set at project level or through an annotations model. This page discusses the global options.

Texo Project Nature

To be able to edit the global options you first have to enable the Texo project nature. Do this as follows:

  • right click on the project
  • go to the submenu 'Configure'
  • select the add/remove Texo Nature option

ORM/JPA Options

To edit the options right click on your development project and go to the project properties. There will be a Texo section. Click on it.

You will see 2 tabs. The first tab is used for enabling automatic code generation. The second tab allows you to set ORM/JPA generation defaults.

Org.eclipse.emf.texo.orm.project.options.png


A short description for each of the options:

  • Add Order Column to List Mapping: this option controls if efeatures are mapped with order column, so as a List retaining the order, if this option is not flagged then normally no ordering is maintained in the database for List associations. This results in better performance.
  • Enforce Unique Names: if types/eclasses have the same name potentially naming collisions can occur, flagging this option will prefix all entity (and table) names with the epackage name space prefix.
  • Renamed sql reserved words: if flagged then column and other database schema names which are a reserved word for sql are renamed/prefixed.
  • Generate all DB schema names: if checked then Texo will generate all the relevant ORM/JPA annotations to fully map the columns and tables with full naming choices.
  • Maximum sql name length: a number, if set or higher than zero then Texo will truncate table and column names which are longer than this value.

Note that these option only apply if no Orm annotation is present on EPackage level.

Back to the top