openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vermeulen (JIRA)" <>
Subject [jira] [Created] (OPENJPA-2375) generate predictable names for primary and foreign keys
Date Wed, 24 Apr 2013 10:53:15 GMT
Vermeulen created OPENJPA-2375:

             Summary: generate predictable names for primary and foreign keys
                 Key: OPENJPA-2375
             Project: OpenJPA
          Issue Type: Improvement
          Components: jdbc
    Affects Versions: 2.2.1
            Reporter: Vermeulen

When the MappingTool creates the database schema, OpenJPA will let the database determine
the names of primary and foreign key constraints. Microsoft SQL server uses a seemingly random
number which changes each time the database schema is generated. This makes it harder to create
SQL scripts that refer to these keys or use schema comparison tools.

Names of generated keys could e.g. be:
PK_<table name>
FK_<table name>_<referenced foreign column name>
(Perhaps adding foreign table name as well to prevent possible name clashes)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message