mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-23 05:35:54 +00:00
No effective change - tidy FactoryProperty
This commit is contained in:
+1
-2
@@ -31,8 +31,7 @@ class BindablePropertyJsonUpdate extends BindableProperty {
|
||||
final MutableValueInfo hash = prop.createMutableInfo(json);
|
||||
bean._ebean_getIntercept().mutableInfo(propertyIndex, hash);
|
||||
request.pushJson(json);
|
||||
final Object value = prop.getValue(bean);
|
||||
request.bind(value, prop);
|
||||
request.bind(prop.getValue(bean), prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-5
@@ -2,6 +2,7 @@ package io.ebeaninternal.server.persist.dmlbind;
|
||||
|
||||
import io.ebeaninternal.server.deploy.BeanProperty;
|
||||
import io.ebeaninternal.server.deploy.BeanPropertyAssocOne;
|
||||
import io.ebeaninternal.server.deploy.BeanPropertyJsonMapper;
|
||||
import io.ebeaninternal.server.persist.dml.DmlMode;
|
||||
|
||||
/**
|
||||
@@ -23,14 +24,12 @@ class FactoryProperty {
|
||||
* Create a Bindable for the property given the mode and withLobs flag.
|
||||
*/
|
||||
public Bindable create(BeanProperty prop, DmlMode mode, boolean withLobs, boolean allowManyToOne) {
|
||||
|
||||
if (DmlMode.INSERT == mode && !prop.isDbInsertable()) {
|
||||
return null;
|
||||
}
|
||||
if (DmlMode.UPDATE == mode && !prop.isDbUpdatable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (prop.isLob() && !withLobs) {
|
||||
// Lob exclusion
|
||||
return null;
|
||||
@@ -38,12 +37,10 @@ class FactoryProperty {
|
||||
if (prop.isDbEncrypted()){
|
||||
return new BindableEncryptedProperty(prop, bindEncryptDataFirst);
|
||||
}
|
||||
|
||||
if (allowManyToOne && prop instanceof BeanPropertyAssocOne) {
|
||||
return new BindableAssocOne((BeanPropertyAssocOne<?>)prop);
|
||||
}
|
||||
|
||||
if (prop.getScalarType().isJsonMapper()) {
|
||||
if (prop instanceof BeanPropertyJsonMapper) {
|
||||
if (DmlMode.INSERT == mode) {
|
||||
return new BindablePropertyJsonInsert(prop);
|
||||
} else if (DmlMode.UPDATE == mode) {
|
||||
|
||||
Reference in New Issue
Block a user