// also foreign key columns
PrimaryKey pk = (join != null) ? null : table.getPrimaryKey();
boolean pkcol;
Column[] cols = table.getColumns();
for (int i = 0; i < cols.length; i++) {
pkcol = pk != null && pk.containsColumn(cols[i]);
if (pkcol && cls.getIdentityType() == ClassMapping.ID_DATASTORE)
continue;
if ((cls.getPCSuperclass() == null && pkcol)
|| !isForeignKeyColumn(cols[i]))
mapColumn(cls, cols[i], join, outer);