if (column.getAnnotation(PrimaryKey.class) != null && ++primaryKeyCount > 1) {
messager.printMessage(Kind.ERROR, "Only one @PrimaryKey is allowed within an @Entity", entity);
return null;
}
ColumnReader columnReader = new ColumnReader(column, messager);
Column read = columnReader.read();
if (read != null) {
table.addColumn(read);
}
}
VariableElement association = child.accept(new AssociationElementResolvingTypeVisitor(), null);
if (association != null) {
AssociationReader associationReader = new AssociationReader(association, entityNames, messager);
Association read = associationReader.read();
if (read != null) {
table.addAssociation(read);
if (AssociationType.TO_MANY == read.getCardinality()) {
if (countedToManyAssociations.containsKey(read.getCanonicalTypeInEntity())) {
countedToManyAssociations.get(read.getCanonicalTypeInEntity()).incrementAndGet();
} else {
countedToManyAssociations.put(read.getCanonicalTypeInEntity(), new AtomicInteger(1));
}
}
}
}
}