openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-340) @UniqueConstraint and corresponding XML ignored
Date Tue, 28 Aug 2007 15:57:30 GMT

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


Mime
View raw message