mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Use scalarType.format(value) removing scalarType.jsonMapper(value)
Remove scalarType.jsonMapper(value) as we can just use format(value) instead
This commit is contained in:
@@ -35,7 +35,7 @@ public class BeanPropertyJsonMapper extends BeanProperty {
|
||||
@Override
|
||||
boolean isDirtyValue(Object value, EntityBeanIntercept ebi) {
|
||||
// dirty detection based on md5 hash of json content
|
||||
final String json = scalarType.jsonMapper(value);
|
||||
final String json = scalarType.format(value);
|
||||
final MutableHash oldHash = ebi.mutableHash(propertyIndex);
|
||||
if (oldHash == null || !oldHash.isEqualToJson(json)) {
|
||||
ebi.mutableContent(propertyIndex, json); // so we only convert to json once
|
||||
|
||||
@@ -66,11 +66,6 @@ class ScalarTypeJsonObjectMapper {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String jsonMapper(Object value) {
|
||||
return formatValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object read(DataReader reader) throws SQLException {
|
||||
String json = reader.getString();
|
||||
|
||||
Reference in New Issue
Block a user