You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Patrick Linskey (JIRA)" <ji...@apache.org> on 2007/08/28 17:41:30 UTC
[jira] Created: (OPENJPA-340) @UniqueConstraint and corresponding
XML ignored
@UniqueConstraint and corresponding XML ignored
-----------------------------------------------
Key: OPENJPA-340
URL: https://issues.apache.org/jira/browse/OPENJPA-340
Project: OpenJPA
Issue Type: Bug
Reporter: Patrick Linskey
Fix For: 1.1.0
OpenJPA ignores @UniqueConstraint annotations (and the corresponding XML declaration) when generating database schemas. This should be rectified.
A workaround is to set the -ignoreErrors flag to true when running mappingtool, which will let schema creation continue despite the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-340) @UniqueConstraint and corresponding
XML ignored
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523267 ]
Pinaki Poddar commented on OPENJPA-340:
---------------------------------------
Currently partial support exists. Unique constraints can be specified at @Table annotation is processed.
For example, given
@Entity
@Table(name="Person",uniqueConstraints=@UniqueConstraint(columnNames={"first","last"}))
public class Person {
@Id
private long id;
private String first;
private String last;
}
will generate following table schema
CREATE TABLE Person (id BIGINT NOT NULL, first VARCHAR(255), last VARCHAR(255), PRIMARY KEY (id), UNIQUE (first, last))
> @UniqueConstraint and corresponding XML ignored
> -----------------------------------------------
>
> Key: OPENJPA-340
> URL: https://issues.apache.org/jira/browse/OPENJPA-340
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Patrick Linskey
> Fix For: 1.1.0
>
>
> OpenJPA ignores @UniqueConstraint annotations (and the corresponding XML declaration) when generating database schemas. This should be rectified.
> A workaround is to set the -ignoreErrors flag to true when running mappingtool, which will let schema creation continue despite the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-340) @UniqueConstraint and corresponding
XML ignored
Posted by "Andy Schlaikjer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564520#action_12564520 ]
Andy Schlaikjer commented on OPENJPA-340:
-----------------------------------------
looks like @JoinTable(uniqueConstraints=...) is not supported either.
> @UniqueConstraint and corresponding XML ignored
> -----------------------------------------------
>
> Key: OPENJPA-340
> URL: https://issues.apache.org/jira/browse/OPENJPA-340
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Patrick Linskey
> Fix For: 1.1.0
>
>
> OpenJPA ignores @UniqueConstraint annotations (and the corresponding XML declaration) when generating database schemas. This should be rectified.
> A workaround is to set the -ignoreErrors flag to true when running mappingtool, which will let schema creation continue despite the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-340) @UniqueConstraint and corresponding
XML ignored
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar resolved OPENJPA-340.
-----------------------------------
Resolution: Fixed
> @UniqueConstraint and corresponding XML ignored
> -----------------------------------------------
>
> Key: OPENJPA-340
> URL: https://issues.apache.org/jira/browse/OPENJPA-340
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Patrick Linskey
> Fix For: 1.2.0
>
>
> OpenJPA ignores @UniqueConstraint annotations (and the corresponding XML declaration) when generating database schemas. This should be rectified.
> A workaround is to set the -ignoreErrors flag to true when running mappingtool, which will let schema creation continue despite the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-340) @UniqueConstraint and corresponding
XML ignored
Posted by "Amy Yang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601516#action_12601516 ]
Amy Yang commented on OPENJPA-340:
----------------------------------
looks like only @Table(uniqueConstraints=@UniqueConstraint(....)) is supported.
@SecondaryTable, @JoinTable, and @TableGenerator need be supported.
> @UniqueConstraint and corresponding XML ignored
> -----------------------------------------------
>
> Key: OPENJPA-340
> URL: https://issues.apache.org/jira/browse/OPENJPA-340
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Patrick Linskey
> Fix For: 1.2.0
>
>
> OpenJPA ignores @UniqueConstraint annotations (and the corresponding XML declaration) when generating database schemas. This should be rectified.
> A workaround is to set the -ignoreErrors flag to true when running mappingtool, which will let schema creation continue despite the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-340) @UniqueConstraint and corresponding
XML ignored
Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Linskey updated OPENJPA-340:
------------------------------------
Fix Version/s: (was: 1.1.0)
1.2.0
> @UniqueConstraint and corresponding XML ignored
> -----------------------------------------------
>
> Key: OPENJPA-340
> URL: https://issues.apache.org/jira/browse/OPENJPA-340
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Patrick Linskey
> Fix For: 1.2.0
>
>
> OpenJPA ignores @UniqueConstraint annotations (and the corresponding XML declaration) when generating database schemas. This should be rectified.
> A workaround is to set the -ignoreErrors flag to true when running mappingtool, which will let schema creation continue despite the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.