Description:
|
Test case: o.h.test.annotations.embedded.Address & Country.
{code} @Embeddable public class Address implements Serializable { ... Country country; ... (no getters or setters) } {code}
{code} @Embeddable @AccessType("property") public class Country implements Serializable { ... } {code}
When metamodel's Binder creates the AttributeBinding for Address#country, the binding is passed the access type of Country's attributeSource. Therefore, when Address#country is accessed, the PROPERTY access type is attempted. Since
Country
has no
getters
getCountry()
, it fails.
Should an attribute's class's @AccessType override that of the containing entity? Or, should Binder use the parent container's access type for all attributes?
I'm guessing 4.1.x used Address's FIELD access type, as this is an old test (EmbeddedTest) that worked there.
|