Fix for #83 - Bug: Stateless update cascading to OneToOne or ManyToOne incorrectly tries to INSERT rather than UPDATE

This commit is contained in:
Rob Bygrave
2014-04-23 02:31:08 +12:00
parent f4357c2767
commit 654b10154e
6 changed files with 22 additions and 30 deletions
@@ -2300,7 +2300,6 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
if (beanState == null) {
return null;
} else {
beanState.setLoadedState();
return (T) beanState.getBean();
}
}
@@ -847,9 +847,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> {
childMasterProperty.setValue(detailBean, bean);
detailBeanState.setLoaded(childMasterProperty.getName());
}
detailBeanState.setLoadedState();
if (!ctx.readArrayNext()){
break;
}
@@ -161,12 +161,6 @@ public class ReadJsonContext extends ReadBasicJsonContext {
}
}
public void setLoadedState(){
if (ebi != null){
ebi.setLoaded();
}
}
public void propertyChange(PropertyChangeEvent evt) {
String propName = evt.getPropertyName();
loadedProps.add(propName);