mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1738 - Refactor toArray() plus various
This commit is contained in:
1 parent
7fa5e2aa8c
commit
ddf200ffdd
33 files changed
+50
-53
No files matched your search
@@ -582,7 +582,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
}
|
||||
}
|
||||
|
||||
return list.toArray(new ExportedProperty[list.size()]);
|
||||
return list.toArray(new ExportedProperty[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -769,10 +769,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
writeJson.writeNullField(name);
|
||||
|
||||
} else {
|
||||
if (writeJson.isParentBean(value)) {
|
||||
// bi-directional and already rendered parent
|
||||
|
||||
} else {
|
||||
if (!writeJson.isParentBean(value)) {
|
||||
// Hmmm, not writing complex non-entity bean
|
||||
if (value instanceof EntityBean) {
|
||||
writeJson.beginAssocOne(name, bean);
|
||||
|
||||
Reference in new issue
Block a user