mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix for #83 - Bug: Stateless update cascading to OneToOne or ManyToOne incorrectly tries to INSERT rather than UPDATE
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user