aggregateMapping.addFieldNameTranslation(joinColumn.name(), fkField.getName());
/** * INTERNAL: (Overridden in EmbeddedIdAccessor) * * Process an @AttributeOverride or attribute-override element for an * embedded object, that is, an aggregate object mapping in TopLink. */ protected void processAttributeOverride(AggregateObjectMapping mapping, MetadataColumn column) { String attributeName = column.getAttributeName(); // Set the attribute name on the aggregate. DatabaseMapping aggregateMapping = getReferenceDescriptor().getMappingForAttributeName(attributeName); if (aggregateMapping == null) { m_validator.throwInvalidEmbeddableAttribute(getJavaClass(), mapping.getAttributeName(), getReferenceDescriptor().getJavaClass(), attributeName); } // A sub-class to a mapped superclass may override an embedded attribute // override. if (m_descriptor.hasAttributeOverrideFor(attributeName)) { // Update the field on this metadata column. We do that so that // an embedded id can associate the correct id fields. column.setDatabaseField(m_descriptor.getAttributeOverrideFor(attributeName).getDatabaseField()); } mapping.addFieldNameTranslation(column.getDatabaseField().getQualifiedName(), aggregateMapping.getField().getName()); }