JBPAPP-1075 - Removed the @JoinColumn mappings. Thought not wrong per se they cause some wrong table creation scripts. Removing them circumvents this problem without affecting the test.

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17527 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Hardy Ferentschik 2009-09-18 09:06:47 +00:00
parent 0a1763a207
commit b8da757937
3 changed files with 4 additions and 15 deletions

View File

@ -10,7 +10,8 @@ import javax.persistence.Column;
*/
@MappedSuperclass
public class Company implements Serializable {
@Column(unique = true) private String name;
@Column
private String name;
public String getName() {
return name;

View File

@ -5,17 +5,14 @@ import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.hibernate.annotations.Where;
import org.hibernate.annotations.FilterDef;
import org.hibernate.annotations.Filter;
import org.hibernate.annotations.FilterDef;
import org.hibernate.annotations.FilterJoinTable;
import org.hibernate.annotations.Where;
import org.hibernate.annotations.WhereJoinTable;
/**
@ -38,10 +35,6 @@ public class Group {
}
@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "GROUPS_PERMISSIONS",
joinColumns = @JoinColumn(name = "group_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "permission", referencedColumnName = "permission")
)
@OrderBy("expirationDate")
@Where(clause = "1=1")
@WhereJoinTable(clause = "2=2")

View File

@ -40,11 +40,6 @@ public class GroupWithSet {
}
@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "GROUPS_PERMISSIONS",
uniqueConstraints = @UniqueConstraint(columnNames = {"group_id", "permission"}),
joinColumns = @JoinColumn(name = "group_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "permission", referencedColumnName = "permission")
)
@OrderBy("expirationDate")
@Where(clause = "1=1")
@WhereJoinTable(clause = "2=2")