mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-26 07:20:56 +00:00
#1594 - Support loading of beans with invalid JSON content
Adjust to be per query via query.setAllowLoadErrors() rather than a global config via ServerConfig.
This commit is contained in:
1 parent
9fc10e8e04
commit
2b0669c2ae
10 files changed
+86
-64
No files matched your search
@@ -94,6 +94,6 @@ public interface DbReadContext {
|
||||
/**
|
||||
* Handles a load error on given property.
|
||||
*/
|
||||
void handleLoadError(EntityBean bean, BeanProperty prop, String fullName, Exception e);
|
||||
void handleLoadError(String fullName, Exception e);
|
||||
|
||||
}
|
||||
@@ -52,9 +52,8 @@ class DynamicPropertyAggregationFormula extends DynamicPropertyBase {
|
||||
Object value;
|
||||
try {
|
||||
value = scalarType.read(sqlBeanLoad.ctx().getDataReader());
|
||||
|
||||
} catch (Exception e) {
|
||||
sqlBeanLoad.ctx().handleLoadError(null, asTarget, fullName, e);
|
||||
sqlBeanLoad.ctx().handleLoadError(fullName, e);
|
||||
return;
|
||||
}
|
||||
if (asTarget != null) {
|
||||
|
||||
Reference in new issue
Block a user