[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Customizing the column names of embeddables
|
Hi,
I am trying to customize the column names of embeddables with the help of a
class customizer, but I am somehow stuck.
Let's say you have a class "Parcel" with attributes height, length, width -
all of them are of the same type "LengthType". "LengthType" is an embeddable
consisting of value and unit. So If you what to map this, you have the use
@AttributeOverride-annotations - otherwise you will end with three columns
named "value" and three ones named "unit".
So to get rid of the @AttributeOverrides, I wrote a class customizer and
annotated the "Parcel"-class. Within the customize-method, I called
classDescriptor.getMappingForAttributeName("height"),... to manipulate the
fieldnames on that mapping. However at this place, I am not able to get
information about the "LengthType"-class and its fields:
classDescriptor.getMappingForAttributeName("height").getReferenceDescriptor()
is returning null. On the other hand, getReferenceClass() is returning
"LengthType" as expexted. But I need some sort of Session to lookup the
class descriptor by type - with I do not have at this place.
How do I get to the class descriptor of the referenced class (i.e.
"LengthType")?
Thank you,
Frank
--
View this message in context: http://old.nabble.com/Customizing-the-column-names-of-embeddables-tp28276405p28276405.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.