Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Customizing the column names of embeddables

Don't use,
  mapping.getReferenceDescriptor() (this is internal and not available until
after initialization)


then in your mapping you can override each column value using the
AggregateObjectMapping addFieldNameTranslation() method.

Frank Schwarz wrote:
> Thank you for your response. I tried the session-customizer and found that
> with the post-login-event the getReferenceDescriptor()-method begins
> returning a value other than null for the @embedded-field-mapping. Not too
> late for EclipseLink to create the correct tables itself, but too late for
> using the SchemaManager to create the DDL-scripts (see also Bug 227145 and
> 243321).
> The actual question is somewhat more abstract:
> 1.) Can one expect that the mapping is fully initialized when it is passed
> into a descriptor-customizer?
> From looking at the sources, the mapping of an embeddable is somewhat of a
> corner case. Can the initialization process be reorderd? Is this a valid
> RFE? (IHMO at least Bug 243321 is to depend on it.)
> 2.) If reordering is not feasible, would it be possible to get access to
> the metadata-system from within the descriptor-customizer? Would this be a
> valid RFE? (Perhaps a DescriptorCustomizer2-interface which also passes
> into the customize()-method the current server-session as the second
> argument?)
> I really appreciate your help,
> Frank
> James Sutherland wrote:
>> You need to get the descriptor for LengthType, so need the Session to do
>> this.  Perhaps use a SessionCustomizer instead of a DescriptorCustomizer.

----- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top