mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Re-enable TestDbJson_Jackson3 via adding mutationDetection = HASH to beanList property
@DbJsonB(mutationDetection = HASH) List<PlainBean> beanList;
This commit is contained in:
@@ -161,10 +161,7 @@ public class TestDbJson_Jackson3 extends BaseTestCase {
|
||||
final EBasicJsonList found = DB.find(EBasicJsonList.class, bean.getId());
|
||||
found.getBeanList().get(0).setName("p1-mod");
|
||||
|
||||
// BeanState state = DB.getBeanState(found);
|
||||
// assertThat(state.getChangedProps()).containsExactlyInAnyOrder("beanList");
|
||||
// this test fails, because we have a OmList instead of a GenericObject
|
||||
// TODO: Can/Should we enhance the @DbJson/@DbJsonB annotations with a property "dirtyDetection"
|
||||
|
||||
BeanState state = DB.getBeanState(found);
|
||||
assertThat(state.getChangedProps()).containsExactlyInAnyOrder("beanList");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import javax.persistence.Id;
|
||||
import javax.persistence.Version;
|
||||
import java.util.*;
|
||||
|
||||
import static io.ebean.annotation.MutationDetection.HASH;
|
||||
import static io.ebean.annotation.MutationDetection.SOURCE;
|
||||
|
||||
@Entity
|
||||
@@ -22,7 +23,7 @@ public class EBasicJsonList {
|
||||
@DbJson(length = 700, name = "beans")
|
||||
Set<PlainBean> beanSet;
|
||||
|
||||
@DbJsonB
|
||||
@DbJsonB(mutationDetection = HASH)
|
||||
List<PlainBean> beanList;
|
||||
|
||||
@DbJson(length = 700)
|
||||
|
||||
Reference in New Issue
Block a user