} else {
// If we are a multitenant entity and the number of primary key join
// columns does not equal the number of primary key fields we must
// add the multitenant primary key tenant discriminator fields.
if (getDescriptor().hasSingleTableMultitenant() && primaryKeyJoinColumns.size() != getDescriptor().getPrimaryKeyFields().size()) {
SingleTableMultitenantPolicy policy = (SingleTableMultitenantPolicy) getDescriptor().getClassDescriptor().getMultitenantPolicy();
Map<DatabaseField, String> tenantFields = policy.getTenantDiscriminatorFields();
// Go through the key sets ...
for (DatabaseField tenantField : tenantFields.keySet()) {
if (tenantField.isPrimaryKey()) {
PrimaryKeyJoinColumnMetadata primaryKeyJoinColumn = new PrimaryKeyJoinColumnMetadata();