Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Fix for bug# 316991: Attribute.getJavaMember() returns null for an attribute of an embeddable managed type

Everyone,
   The following patch for bug# 316991 is available for review.
The issue is that any call to Attribute.getJavaMember() for Embeddables returns null instead of a Field or Method for @Embeddable types optionally used as @EmbeddedId. The fix for DI95 getJavaMethod() call on attribute of @Embeddable requires handling for a null getMethod by doing a reflective call on the managedType using the method name. We need the same reflective code from ManagedTypeImpl.initialize() that gets the Member using the method or attribute name when the getMethod is missing.

   https://bugs.eclipse.org/bugs/attachment.cgi?id=172046&action=diff
   http://bugs.eclipse.org/316991
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_105:_20100616:_316991:_Attribute.getJavaMember.28.29_returns_null_for_all_Embeddable_Attributes

   New tests are in MetamodelMetamodelTest.
   thank you
   /michael




Back to the top