The method BeanMaker.trySetValue() calls BeanUtils.setProperty if the JPA AccessType is PROPERTY, but it uses a field name instead of a property name. To make things worse, it seems that org.apache.commons.beanutils.BeanUtils.setProperty() fails silently if the requested property doesn't exist. This leaves the entity property with its default value, instead of setting the requested value.
This interacts badly with Kotlin's approach to interop for boolean properties - a Boolean Kotlin property named isActive will be exposed with the getter isActive() and the setter setActive() (thus the JavaBean property name is active), but the backing field is named isActive, not active. This is perfectly valid for JavaBeans, and would not be a problem, except that entityunit tries to access the JavaBean property (active) using the field name (isActive).
The method
BeanMaker.trySetValue()callsBeanUtils.setPropertyif the JPA AccessType is PROPERTY, but it uses a field name instead of a property name. To make things worse, it seems thatorg.apache.commons.beanutils.BeanUtils.setProperty()fails silently if the requested property doesn't exist. This leaves the entity property with its default value, instead of setting the requested value.This interacts badly with Kotlin's approach to interop for boolean properties - a Boolean Kotlin property named
isActivewill be exposed with the getterisActive()and the settersetActive()(thus the JavaBean property name isactive), but the backing field is namedisActive, notactive. This is perfectly valid for JavaBeans, and would not be a problem, except that entityunit tries to access the JavaBean property (active) using the field name (isActive).