1. @UniqueConstraint check across multiple tables in JPA stackoverflow.comCampus has @OneToMany Buildings Building has @OneToMany Rooms. Room names needs to be unique within a campus (e.g. campus-A, block-A, room-A and campus-B, block-A, room-A should be possible to store) Would it ... |
2. Hibernate: @UniqueConstraint with @ManyToOne field? stackoverflow.comUsing the following code:
I get the following ... |
3. @UniqueConstraint annotation in Java stackoverflow.comi have a java bean , now i want to be sure that the field sholud be unique. Am using following code
But am geting some error.
|
4. JPA: alternative keys via @UniqueConstraint a DDL feature only? stackoverflow.comI'm basically referring to this: Compound keys in JPA Is the @UniqueConstraint annotation a DDL generation feature only, or more specifically, does it have any effect at runtime, e.g. SQL generation? |
5. Hibernate: @UniqueConstraint Across Multiple Tables? stackoverflow.comI have a data model in which a number of entities inherit some common attributes from a single superclass entity. I am using |
6. @UniqueConstraint check does not apply forum.hibernate.orgI'm using Hibernate 3.3 with PostgreSQL 8.3 I'm trying to set the UniqueConstraint on the table Rubric in Hibernate. Note that the corresponding constraints on the table Rubric in PosgreSQL database aren't defined. I want only Hibernate checks the constraint, beacause I can't change the database structure. But when I create an object Rubric that violates the constraint Hibernate does not ... |
7. @UniqueConstraint annotation in Table-per-class hierarchy forum.hibernate.orgCan the @uniqueConstraint annotation be specified on subclasses in a table-per-class hierarchy relationship? For example, I have a Class Device and ManagedDevice is a subclass of Device Code: @Entity @Inheritence(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name="ObjectType") @DiscriminatorValue("Device") @Table(uniqueConstraints = @UniqueConstraint(name="primaryIp_U", columnNames={"primaryIpAddress"}) ) ... |
8. JPA, @UniqueConstraint not considering 'name' forum.hibernate.orgHi All- I am trying to specify my own name for a unique constraint, however, hibernate and/or JPA is not taking it into account, the constraint does get created, but with a random provider (SQLServer 2005) chosen name. Here is my entity: Code: @Entity @Table(name = "TEST_TABLE1", uniqueConstraints = { @UniqueConstraint(name="UQ__TESTTABLE1__NAME", columnNames={"NAME"})}) public class MyTest ... |
9. @UniqueConstraint on @Table not generating contstraint forum.hibernate.orgAfter reading the hibnerate docs I added this annotation to my class: Code: @Table(uniqueConstraints={@UniqueConstraint(columnNames={"unixGroupName","hostId"})}) It did not generate any new contstraints, but it seems to be working for everyone else so I started debugging. I found that it is finding and building the UniqueConstraints but it never sends them to the DB. There is a call in the generateSchemaUpdateScript method of ... |
10. @UniqueConstraint forum.hibernate.org |
11. Unique indexes not created with @UniqueConstraint annotation forum.hibernate.org[b]Hibernate version:[/b] hibernate core 3.3.0.SP1, hibernate annotations 3.4.0.GA [b]Name and version of the database you are using:[/b] DB2 version 9 I have @Table annotation for all my java beans, something like this... @Table(name = |