Supports loading of corrupt beans

This commit is contained in:
Roland Praml
2019-01-03 11:43:50 +01:00
parent 0b299edf0d
commit 4d93b70bf9
26 changed files with 221 additions and 24 deletions
@@ -6,8 +6,6 @@ import io.ebeaninternal.api.SpiQuery.Mode;
import io.ebeaninternal.server.deploy.BeanProperty;
import io.ebeaninternal.server.deploy.DbReadContext;
import javax.persistence.PersistenceException;
/**
* Controls the loading of property data into a bean.
* <p>
@@ -88,8 +86,9 @@ public class SqlBeanLoad {
return dbVal;
} catch (Exception e) {
String msg = "Error loading on " + prop.getFullBeanName();
throw new PersistenceException(msg, e);
bean._ebean_getIntercept().setLoadError(prop.getPropertyIndex(), e);
ctx.handleLoadError(bean, prop, prop.getFullBeanName(), e);
return prop.getValue(bean);
}
}