Fix for Issue 43 - Support for JSON unmarshalling of @XmlRootElement

beans.
This commit is contained in:
Rob Bygrave committed 2013-07-29 23:24:30 +12:00
1 parent 6f579ba890
commit 44d95dc06c
5 files changed
+74 -16

No files matched your search

@@ -2,6 +2,7 @@ package com.avaje.ebeaninternal.server.deploy;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
@@ -752,7 +753,11 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> {
Object value = getValueIntercept(bean);
if (value != null){
ctx.pushParentBeanMany(bean);
help.jsonWrite(ctx, name, value, include != null);
if (help != null){
help.jsonWrite(ctx, name, value, include != null);
} else {
ctx.toJson(name, (Collection<?>)value);
}
ctx.popParentBeanMany();
}
}