Not creating the Unique constraint on the DB (postgreSQL) [message #803201] |
Mon, 20 February 2012 22:07  |
Eclipse User |
|
|
|
I got this annotation on my entity class and I am sure that in another version (actually 2.3.0), this worked fine
@Entity
@Table(uniqueConstraints = {
@UniqueConstraint(columnNames = {"institucion", "sector", "codigo"})
})
public class Afiliacion implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
protected Integer id;
@ManyToOne(optional = false)
protected Institucion institucion;
@ManyToOne(optional = false)
protected Sector sector;
@Basic(optional = false)
@Column(nullable = false)
protected Integer codigo;
....
is not generating the unique on the DB (PostgreSQL)
Do am I missing something?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03868 seconds