You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Laird Nelson (JIRA)" <ji...@apache.org> on 2009/07/08 21:03:14 UTC
[jira] Created: (OPENJPA-1165) Two unique constraints in a table
try to share the same constraint name
Two unique constraints in a table try to share the same constraint name
-----------------------------------------------------------------------
Key: OPENJPA-1165
URL: https://issues.apache.org/jira/browse/OPENJPA-1165
Project: OpenJPA
Issue Type: Bug
Components: sql
Affects Versions: 1.3.0
Reporter: Laird Nelson
Put two @Column(unique = true) annotations on two different fields in an Entity.
Set up OpenJPA to synchronize mappings (i.e. generate DDL).
Observe that when the DDL is created it attempts to create two unique constraints, one for each column. This is good. However, also observe that both unique constraints are named "UNQ_". This causes the H2 database (and probably others) to reject the DDL as invalid (correctly).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1165) Two unique constraints in a table
try to share the same constraint name
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda updated OPENJPA-1165:
------------------------------------
Affects Version/s: 1.2.1
> Two unique constraints in a table try to share the same constraint name
> -----------------------------------------------------------------------
>
> Key: OPENJPA-1165
> URL: https://issues.apache.org/jira/browse/OPENJPA-1165
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 1.2.1, 1.3.0
> Reporter: Laird Nelson
> Assignee: Milosz Tylenda
>
> Put two @Column(unique = true) annotations on two different fields in an Entity.
> Set up OpenJPA to synchronize mappings (i.e. generate DDL).
> Observe that when the DDL is created it attempts to create two unique constraints, one for each column. This is good. However, also observe that both unique constraints are named "UNQ_". This causes the H2 database (and probably others) to reject the DDL as invalid (correctly).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-1165) Two unique constraints in a table
try to share the same constraint name
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda reassigned OPENJPA-1165:
---------------------------------------
Assignee: Milosz Tylenda
> Two unique constraints in a table try to share the same constraint name
> -----------------------------------------------------------------------
>
> Key: OPENJPA-1165
> URL: https://issues.apache.org/jira/browse/OPENJPA-1165
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 1.3.0
> Reporter: Laird Nelson
> Assignee: Milosz Tylenda
>
> Put two @Column(unique = true) annotations on two different fields in an Entity.
> Set up OpenJPA to synchronize mappings (i.e. generate DDL).
> Observe that when the DDL is created it attempts to create two unique constraints, one for each column. This is good. However, also observe that both unique constraints are named "UNQ_". This causes the H2 database (and probably others) to reject the DDL as invalid (correctly).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1165) Two unique constraints in a table
try to share the same constraint name
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda resolved OPENJPA-1165.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0
I have ported the fix from trunk to 1.3.x branch.
> Two unique constraints in a table try to share the same constraint name
> -----------------------------------------------------------------------
>
> Key: OPENJPA-1165
> URL: https://issues.apache.org/jira/browse/OPENJPA-1165
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 1.2.1, 1.3.0
> Reporter: Laird Nelson
> Assignee: Milosz Tylenda
> Fix For: 1.3.0
>
>
> Put two @Column(unique = true) annotations on two different fields in an Entity.
> Set up OpenJPA to synchronize mappings (i.e. generate DDL).
> Observe that when the DDL is created it attempts to create two unique constraints, one for each column. This is good. However, also observe that both unique constraints are named "UNQ_". This causes the H2 database (and probably others) to reject the DDL as invalid (correctly).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.