mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Allow for null items in @DbArray lists. (#1812)
* Added code to allow for null items in @DbArray lists. * Test case for changing OneToMany collection by editing target bean.
This commit is contained in:
committed by
Rob Bygrave
parent
8ae2ae7f8b
commit
b329ae42db
@@ -104,7 +104,8 @@ public class ScalarTypeArrayList extends ScalarTypeArrayBase<List> implements Sc
|
||||
protected List fromArray(Object[] array1) {
|
||||
List list = new ArrayList(array1.length);
|
||||
for (Object element : array1) {
|
||||
list.add(converter.toElement(element));
|
||||
if(element == null ) list.add(null);
|
||||
else list.add(converter.toElement(element));
|
||||
}
|
||||
return new ModifyAwareList(list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user