You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Vermeulen (JIRA)" <ji...@apache.org> on 2013/04/25 10:30:15 UTC
[jira] [Updated] (OPENJPA-2375) generate predictable names for
primary and foreign keys
[ https://issues.apache.org/jira/browse/OPENJPA-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vermeulen updated OPENJPA-2375:
-------------------------------
Description:
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>_<foreign key column name(s)>
was:
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)
> generate predictable names for primary and foreign keys
> -------------------------------------------------------
>
> Key: OPENJPA-2375
> URL: https://issues.apache.org/jira/browse/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>_<foreign key column name(s)>
--
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: http://www.atlassian.com/software/jira