}
private void introspectSecondaryTable(EntityType entityType, Class type)
{
getInternalSecondaryTableConfig(type, _annotationCfg);
SecondaryTable secondaryTableAnn = (SecondaryTable) _annotationCfg.getAnnotation();
SecondaryTableConfig secondaryTableConfig = _annotationCfg.getSecondaryTableConfig();
AmberTable secondaryTable = null;
if ((secondaryTableAnn != null) || (secondaryTableConfig != null)) {
String secondaryName;
if (secondaryTableAnn != null)
secondaryName = secondaryTableAnn.name();
else
secondaryName = secondaryTableConfig.getName();
secondaryTable = _persistenceUnit.createTable(secondaryName);
entityType.addSecondaryTable(secondaryTable);
// XXX: pk
}
if (secondaryTableAnn != null) {
PrimaryKeyJoinColumn[] joinAnn = secondaryTableAnn.pkJoinColumns();
linkSecondaryTable(entityType.getTable(),
secondaryTable,
joinAnn);
}