mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fixed tests, if SqlServer has "Latin1_General_100_BIN2" collation. (#1600)
This means, all names are interpreted case sensitive by the db
This commit is contained in:
committed by
Rob Bygrave
parent
0b18189e62
commit
50de32af29
@@ -23,10 +23,10 @@ public class Item {
|
||||
private int region;
|
||||
|
||||
@Embedded
|
||||
@AttributeOverride(name = "lastUpdated", column = @Column(name = "DATE_MODIFIED"))
|
||||
@AttributeOverride(name = "created", column = @Column(name = "DATE_CREATED"))
|
||||
@AttributeOverride(name = "updatedBy", column = @Column(name = "MODIFIED_BY"))
|
||||
@AttributeOverride(name = "createdBy", column = @Column(name = "CREATED_BY"))
|
||||
@AttributeOverride(name = "lastUpdated", column = @Column(name = "date_modified"))
|
||||
@AttributeOverride(name = "created", column = @Column(name = "date_created"))
|
||||
@AttributeOverride(name = "updatedBy", column = @Column(name = "modified_by"))
|
||||
@AttributeOverride(name = "createdBy", column = @Column(name = "created_by"))
|
||||
private AuditInfo auditInfo = new AuditInfo();
|
||||
|
||||
@Version
|
||||
|
||||
@@ -7,7 +7,7 @@ import javax.persistence.Id;
|
||||
@Entity
|
||||
public class Parcel {
|
||||
@Id
|
||||
@Column(name = "parcelId")
|
||||
@Column(name = "parcelid")
|
||||
private Long parcelId;
|
||||
|
||||
private String description;
|
||||
|
||||
@@ -9,13 +9,13 @@ import javax.persistence.OneToOne;
|
||||
@Entity
|
||||
public class ParcelLocation {
|
||||
@Id
|
||||
@Column(name = "parcelLocId")
|
||||
@Column(name = "parcellocid")
|
||||
private Long parcelLocId;
|
||||
|
||||
private String location;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "parcelId", referencedColumnName = "parcelId")
|
||||
@JoinColumn(name = "parcelid", referencedColumnName = "parcelid")
|
||||
private Parcel parcel;
|
||||
|
||||
public Long getParcelLocId() {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Phone implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
|
||||
@Column(name = "ID", unique = true, nullable = false)
|
||||
@Column(name = "id", unique = true, nullable = false)
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class Phone implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "PHONE_NUMBER", nullable = false, unique = true, columnDefinition = "varchar(7)")
|
||||
@Column(name = "phone_number", nullable = false, unique = true, columnDefinition = "varchar(7)")
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class Phone implements Serializable {
|
||||
|
||||
@NotNull
|
||||
@ManyToOne(targetEntity = Person.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "PERSON_ID", nullable = false)
|
||||
@JoinColumn(name = "person_id", nullable = false)
|
||||
public Person getPerson() {
|
||||
return person;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import javax.persistence.InheritanceType;
|
||||
@DiscriminatorValue("truck")
|
||||
public class TTruck extends TCar {
|
||||
|
||||
@Column(name = "truckLoad")
|
||||
@Column(name = "truckload")
|
||||
Long load;
|
||||
|
||||
public Long getLoad() {
|
||||
|
||||
@@ -24,11 +24,11 @@ public class ROrder {
|
||||
@ManyToOne(cascade = CascadeType.PERSIST)
|
||||
@JoinColumns({
|
||||
@JoinColumn(name = "company", referencedColumnName = "company", insertable = false, updatable = false),
|
||||
@JoinColumn(name = "customerName", referencedColumnName = "name", insertable = false, updatable = false)
|
||||
@JoinColumn(name = "customername", referencedColumnName = "name", insertable = false, updatable = false)
|
||||
})
|
||||
private RCustomer customer;
|
||||
|
||||
@Column(name = "customerName")
|
||||
@Column(name = "customername")
|
||||
@Size(max=127)
|
||||
private String customerName;
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ public class EFile2NoFk {
|
||||
|
||||
// owner without softdelete property - will throw bean has been deleted
|
||||
@ManyToOne
|
||||
@Formula(select = "${ta}.Owner_Id")
|
||||
@Formula(select = "${ta}.owner_id")
|
||||
EUserNoFk owner;
|
||||
|
||||
// owner with softdelete property - will set the property to true
|
||||
@ManyToOne
|
||||
@Formula(select = "${ta}.Owner_id")
|
||||
@Formula(select = "${ta}.owner_id")
|
||||
EUserNoFkSoftDel ownerSoftDel;
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public class ResourceFile extends BaseResourceFile {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = true)
|
||||
@JoinColumn(name = "parentResourceFileId", nullable = true)
|
||||
@JoinColumn(name = "parentresourcefileid", nullable = true)
|
||||
private ResourceFile parent;
|
||||
|
||||
@OneToMany(cascade = CascadeType.REMOVE, fetch = FetchType.LAZY, mappedBy = "parent")
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Category {
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "surveyObjectId")
|
||||
@JoinColumn(name = "surveyobjectid")
|
||||
private Survey survey;
|
||||
|
||||
@OneToMany(mappedBy = "category", cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Group {
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "categoryObjectId")
|
||||
@JoinColumn(name = "categoryobjectid")
|
||||
private Category category;
|
||||
|
||||
@OneToMany(mappedBy = "group", cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
|
||||
@@ -17,7 +17,7 @@ public class Question {
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "groupObjectId")
|
||||
@JoinColumn(name = "groupobjectid")
|
||||
private Group group;
|
||||
|
||||
private int sequenceNumber;
|
||||
|
||||
@@ -105,7 +105,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@IgnorePlatform({Platform.MYSQL, Platform.SQLSERVER})
|
||||
public void test_upperCaseSql() {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -20,7 +20,7 @@ public class PalletLocation {
|
||||
private Integer id;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(name = "ZONE_SID")
|
||||
@JoinColumn(name = "zone_sid")
|
||||
private Zone zone;
|
||||
|
||||
public Integer getId() {
|
||||
|
||||
@@ -19,13 +19,13 @@ public class Warehouse {
|
||||
private Integer id;
|
||||
|
||||
@ManyToOne//(optional = false) //todo: should this be nullable with assertions made?
|
||||
@JoinColumn(name = "officeZoneId")
|
||||
@JoinColumn(name = "officezoneid")
|
||||
private ZoneInternal officeZone;
|
||||
|
||||
@ManyToMany(cascade = CascadeType.PERSIST)
|
||||
@JoinTable(name = "warehousesshippingzones",
|
||||
joinColumns = {@JoinColumn(name = "warehouseId", referencedColumnName = "ID")},
|
||||
inverseJoinColumns = {@JoinColumn(name = "shippingZoneId", referencedColumnName = "ID")}
|
||||
joinColumns = {@JoinColumn(name = "warehouseid", referencedColumnName = "id")},
|
||||
inverseJoinColumns = {@JoinColumn(name = "shippingzoneid", referencedColumnName = "id")}
|
||||
)
|
||||
private Set<ZoneExternal> shippingZones;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user