[
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.