mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
MySQL Ignore tests that use Hash/Source JSON dirty detection
MySQL JSON type will not preserve ordering of keys. No way to return a consistent JSON result with this type hence Hash/Source do not work
This commit is contained in:
@@ -79,6 +79,7 @@ public class TestDbJson_Jackson3 extends BaseTestCase {
|
||||
assertThat(found2.getPlainValue().getName()).isEqualTo("b");
|
||||
}
|
||||
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@Test
|
||||
public void updateIncludesJsonColumn_when_loadedAndNotDirtyAware() {
|
||||
PlainBean contentBean = new PlainBean("a", 42);
|
||||
@@ -141,6 +142,7 @@ public class TestDbJson_Jackson3 extends BaseTestCase {
|
||||
LoggedSql.stop();
|
||||
}
|
||||
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@Test
|
||||
public void updateIncludesJsonColumn_when_list_loadedAndNotDirtyAware() {
|
||||
PlainBean contentBean = new PlainBean("a", 42);
|
||||
|
||||
@@ -31,12 +31,9 @@ public class TestDbJson_List extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void insert() {
|
||||
|
||||
bean.setName("stuff");
|
||||
|
||||
bean.getTags().add("one");
|
||||
bean.getTags().add("two");
|
||||
|
||||
bean.getFlags().add(42L);
|
||||
bean.getFlags().add(43L);
|
||||
bean.getFlags().add(44L);
|
||||
@@ -114,7 +111,9 @@ public class TestDbJson_List extends BaseTestCase {
|
||||
|
||||
// we don't update the phone numbers (as they are not dirty)
|
||||
// plain_bean=?, no longer included with dirty detection
|
||||
assertSql(sql.get(0)).contains("update ebasic_json_list set name=?, version=? where");
|
||||
if (!isMySql()) {
|
||||
assertSql(sql.get(0)).contains("update ebasic_json_list set name=?, version=? where");
|
||||
}
|
||||
}
|
||||
|
||||
private void update_when_dirty() {
|
||||
|
||||
@@ -29,8 +29,9 @@ public class TestJacksonPlainBean extends BaseTestCase {
|
||||
final EBasicPlain found = DB.find(EBasicPlain.class, bean.getId());
|
||||
found.setAttr("n2");
|
||||
DB.save(found);
|
||||
expectedSql(1, "update ebasic_plain set attr=?, version=? where id=? and version=?");
|
||||
|
||||
if (!isMySql()) {
|
||||
expectedSql(1, "update ebasic_plain set attr=?, version=? where id=? and version=?");
|
||||
}
|
||||
LoggedSql.stop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user