The_Jackal
8 Mar 2009, 8:42 PM
BeanModel getProperties() returns an empty map while getPropertyNames() returns a collection of the properties.
Debugging shows that the map field is null - even after an explicit set is called.
I propose that getProperties should override the getProperties in BaseModelData and return the beanProperties (much like the getPropertyNames method does).
Currently it means that to set one BeanModel from another I have to do this:
Collection<String> props = source.getPropertyNames();
for (String prop : props)
{
target.set(prop, source.get(prop));
}
where I'd like to do this:
target.setProperties(source.getProperties());
Debugging shows that the map field is null - even after an explicit set is called.
I propose that getProperties should override the getProperties in BaseModelData and return the beanProperties (much like the getPropertyNames method does).
Currently it means that to set one BeanModel from another I have to do this:
Collection<String> props = source.getPropertyNames();
for (String prop : props)
{
target.set(prop, source.get(prop));
}
where I'd like to do this:
target.setProperties(source.getProperties());