mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-21 08:56:22 +00:00
#3433 - Put test back from desc -> description as desc as a column name isn't widely supported by other databases
This commit is contained in:
@@ -14,7 +14,7 @@ public class BSimpleWithGen {
|
||||
|
||||
private String name;
|
||||
|
||||
private String desc;
|
||||
private String description;
|
||||
|
||||
@Transient
|
||||
private Map<String, List<String>> someMap;
|
||||
@@ -47,11 +47,11 @@ public class BSimpleWithGen {
|
||||
this.someMap = someMap;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class TestTransientMap extends BaseTestCase {
|
||||
|
||||
BSimpleWithGen b = new BSimpleWithGen("blah");
|
||||
b.setSomeMap(map);
|
||||
b.setDesc("hi");
|
||||
b.setDescription("hi");
|
||||
DB.save(b);
|
||||
|
||||
final BSimpleWithGen found = DB.find(BSimpleWithGen.class, b.getId());
|
||||
@@ -30,13 +30,13 @@ class TestTransientMap extends BaseTestCase {
|
||||
assertThat(found.getSomeMap()).isNull();
|
||||
|
||||
Query<BSimpleWithGen> query = DB.find(BSimpleWithGen.class)
|
||||
.where().startsWith("desc", "h")
|
||||
.orderBy().desc("desc");
|
||||
.where().startsWith("description", "h")
|
||||
.orderBy().desc("description");
|
||||
|
||||
var list = query.findList();
|
||||
assertThat(list).hasSize(1);
|
||||
assertThat(query.getGeneratedSql()).contains("where t0.desc like");
|
||||
assertThat(query.getGeneratedSql()).contains("order by t0.desc desc");
|
||||
assertThat(query.getGeneratedSql()).contains("where t0.description like");
|
||||
assertThat(query.getGeneratedSql()).contains("order by t0.description desc");
|
||||
|
||||
DB.delete(b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user