entityData.entity.setTable(table);
// warn about no equivalent of the consistence modes in sun file
for (final org.apache.openejb.jee.sun.SecondaryTable sunSecondaryTable : bean.getSecondaryTable()) {
final SecondaryTable secondaryTable = new SecondaryTable();
secondaryTable.setName(sunSecondaryTable.getTableName());
for (final ColumnPair columnPair : sunSecondaryTable.getColumnPair()) {
SunColumnName localColumnName = new SunColumnName(columnPair.getColumnName().get(0), table.getName());
SunColumnName referencedColumnName = new SunColumnName(columnPair.getColumnName().get(1), table.getName());
// if user specified in reverse order, swap
if (localColumnName.table != null) {
final SunColumnName temp = localColumnName;
localColumnName = referencedColumnName;
referencedColumnName = temp;
}
final PrimaryKeyJoinColumn primaryKeyJoinColumn = new PrimaryKeyJoinColumn();
primaryKeyJoinColumn.setName(localColumnName.column);
primaryKeyJoinColumn.setReferencedColumnName(referencedColumnName.column);
secondaryTable.getPrimaryKeyJoinColumn().add(primaryKeyJoinColumn);
}
}
for (final CmpFieldMapping cmpFieldMapping : bean.getCmpFieldMapping()) {
final String fieldName = cmpFieldMapping.getFieldName();