HHH-10200 fix too long identifiers causing failures on Oracle databases

This commit is contained in:
Jan Martiska 2015-10-19 11:50:40 +02:00 committed by Gail Badner
parent 268a1eaa22
commit 6bf2c78f7e
4 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,8 @@ package org.hibernate.envers.test.entities.components.relations;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import org.hibernate.envers.test.entities.StrTestEntity;
@ -19,6 +21,7 @@ import org.hibernate.envers.test.entities.StrTestEntity;
@Embeddable
public class OneToManyComponent {
@OneToMany
@JoinTable(joinColumns = @JoinColumn(name = "OneToMany_id"))
private Set<StrTestEntity> entities = new HashSet<StrTestEntity>();
private String data;

View File

@ -11,6 +11,8 @@ import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OrderColumn;
import javax.persistence.Table;
@ -35,6 +37,7 @@ public class M2MIndexedListTargetNotAuditedEntity {
@Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
@OrderColumn(name = "sortOrder")
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(joinColumns = @JoinColumn(name = "M2MIndexedList_id"))
private List<UnversionedStrTestEntity> references = new ArrayList<UnversionedStrTestEntity>();

View File

@ -12,6 +12,8 @@ import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
@ -36,6 +38,7 @@ public class ManyToManyNotAuditedNullEntity implements Serializable {
@Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
@ManyToMany(fetch = FetchType.LAZY)
@NotFound(action = NotFoundAction.IGNORE)
@JoinTable(joinColumns = @JoinColumn(name = "M2MNotAudited_id"))
private List<UnversionedStrTestEntity> references = new ArrayList<UnversionedStrTestEntity>();
protected ManyToManyNotAuditedNullEntity() {

View File

@ -12,6 +12,8 @@ import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@ -36,6 +38,7 @@ public class OneToManyNotAuditedNullEntity implements Serializable {
@Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
@OneToMany(fetch = FetchType.LAZY)
@NotFound(action = NotFoundAction.IGNORE)
@JoinTable(joinColumns = @JoinColumn(name = "O2MNotAudited_id"))
private List<UnversionedStrTestEntity> references = new ArrayList<UnversionedStrTestEntity>();
protected OneToManyNotAuditedNullEntity() {