/**
* Parse @SecondaryTable(s).
*/
private void parseSecondaryTables(ClassMapping cm,
SecondaryTable... tables) {
ClassMappingInfo info = cm.getMappingInfo();
Log log = getLog();
String name;
List<Column> joins;
boolean warnUnique = false;
for (SecondaryTable table : tables) {
name = table.name();
if (StringUtils.isEmpty(name))
throw new MetaDataException(_loc.get("second-name", cm));
if (!StringUtils.isEmpty(table.schema()))
name = table.schema() + "." + name;
if (table.pkJoinColumns().length > 0) {
joins = new ArrayList<Column>(table.pkJoinColumns().length);
for (PrimaryKeyJoinColumn join : table.pkJoinColumns())
joins.add(newColumn(join));
info.setSecondaryTableJoinColumns(name, joins);
}
warnUnique |= table.uniqueConstraints().length > 0;
}
//### EJB3