HHH-7187 - tests fail on sybase

This commit is contained in:
Strong Liu 2012-03-26 13:06:12 +08:00
parent 24f2db04fc
commit 37aecde965
6 changed files with 13 additions and 3 deletions

View File

@ -28,6 +28,7 @@ import javax.persistence.ElementCollection;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.MapKeyColumn;
import org.hibernate.envers.Audited; import org.hibernate.envers.Audited;
@ -42,6 +43,7 @@ public class StringMapEntity {
@Audited @Audited
@ElementCollection @ElementCollection
@MapKeyColumn(nullable=false)
private Map<String, String> strings; private Map<String, String> strings;
public StringMapEntity() { public StringMapEntity() {

View File

@ -27,6 +27,7 @@ import java.util.Map;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.ManyToMany; import javax.persistence.ManyToMany;
import javax.persistence.MapKeyColumn;
import org.hibernate.envers.Audited; import org.hibernate.envers.Audited;
@ -44,6 +45,7 @@ public class MapOwningEntity {
@Audited @Audited
@ManyToMany @ManyToMany
@MapKeyColumn(nullable=false)
private Map<String, MapOwnedEntity> references = new HashMap<String, MapOwnedEntity>(); private Map<String, MapOwnedEntity> references = new HashMap<String, MapOwnedEntity>();
public MapOwningEntity() { } public MapOwningEntity() { }

View File

@ -26,6 +26,7 @@ import java.util.Map;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.ManyToMany; import javax.persistence.ManyToMany;
import javax.persistence.MapKeyColumn;
import org.hibernate.envers.Audited; import org.hibernate.envers.Audited;
import org.hibernate.envers.test.entities.StrTestEntity; import org.hibernate.envers.test.entities.StrTestEntity;
@ -44,6 +45,7 @@ public class MapUniEntity {
@Audited @Audited
@ManyToMany @ManyToMany
@MapKeyColumn(nullable=false)
private Map<String, StrTestEntity> map; private Map<String, StrTestEntity> map;
public MapUniEntity() { public MapUniEntity() {

View File

@ -30,10 +30,13 @@ import org.junit.Test;
import org.hibernate.ejb.Ejb3Configuration; import org.hibernate.ejb.Ejb3Configuration;
import org.hibernate.envers.test.AbstractEntityTest; import org.hibernate.envers.test.AbstractEntityTest;
import org.hibernate.testing.DialectChecks;
import org.hibernate.testing.RequiresDialectFeature;
/** /**
* @author Adam Warski (adam at warski dot org) * @author Adam Warski (adam at warski dot org)
*/ */
@RequiresDialectFeature(DialectChecks.SupportsExpectedLobUsagePattern.class)
public class LobSerializables extends AbstractEntityTest { public class LobSerializables extends AbstractEntityTest {
private Integer id1; private Integer id1;

View File

@ -73,6 +73,7 @@ public class PartialModifiedFlagsEntity {
@Audited(withModifiedFlag = true) @Audited(withModifiedFlag = true)
@ElementCollection @ElementCollection
@MapKeyColumn(nullable=false)
private Map<String, String> stringMap = new HashMap<String, String>(); private Map<String, String> stringMap = new HashMap<String, String>();
@Audited(withModifiedFlag = true) @Audited(withModifiedFlag = true)

View File

@ -14,14 +14,14 @@ import org.hibernate.envers.Audited;
public class QuotedFieldsEntity { public class QuotedFieldsEntity {
@Id @Id
@GeneratedValue @GeneratedValue
@Column(name = "`id#`") @Column(name = "`id`")
private Long id; private Long id;
@Column(name = "`#data1`") @Column(name = "`data1`")
@Audited @Audited
private String data1; private String data1;
@Column(name = "`#data2`") @Column(name = "`data2`")
@Audited @Audited
private Integer data2; private Integer data2;