mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
#2856 - @DbArray - improve bind logging, non-null arrays auto bind null to [] so improve bind logging to reflect that
This commit is contained in:
1 parent
5a49041a3b
commit
8e02dedf9f
2 files changed
+6
No files matched your search
@@ -927,6 +927,10 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
return alreadyDirty || value != null && scalarType.isDirty(value);
|
||||
}
|
||||
|
||||
public boolean isArrayType() {
|
||||
return scalarType instanceof ScalarTypeArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the scalarType.
|
||||
*/
|
||||
|
||||
@@ -217,6 +217,8 @@ public abstract class DmlHandler implements PersistHandler, BindableRequest {
|
||||
}
|
||||
if (prop.isLob()) {
|
||||
bindLog.append("[LOB]");
|
||||
} else if (value == null && !prop.isNullable() && prop.isArrayType()) {
|
||||
bindLog.append("[]"); // null bound as empty array
|
||||
} else {
|
||||
String sv = String.valueOf(value);
|
||||
if (sv.length() > 50) {
|
||||
|
||||
Reference in new issue
Block a user