List candidateKeys = super.getExpectedCandidateKeys();
if (keyMapping instanceof EmbeddedKeyPCMapping)
{
// Add all candidate keys required by fields of the embedded key
EmbeddedKeyPCMapping embMapping = (EmbeddedKeyPCMapping)keyMapping;
for (int i=0;i<embMapping.getNumberOfJavaTypeMappings();i++)
{
JavaTypeMapping embFieldMapping = embMapping.getJavaTypeMapping(i);
UniqueMetaData umd = embFieldMapping.getFieldMetaData().getUniqueMetaData();
if (umd != null)
{
CandidateKey ck = TableUtils.getCandidateKeyForField(this, umd, embFieldMapping);
if (ck != null)
{
candidateKeys.add(ck);
}
}
}
}
if (valueMapping instanceof EmbeddedValuePCMapping)
{
// Add all candidate keys required by fields of the embedded value
EmbeddedValuePCMapping embMapping = (EmbeddedValuePCMapping)valueMapping;
for (int i=0;i<embMapping.getNumberOfJavaTypeMappings();i++)
{
JavaTypeMapping embFieldMapping = embMapping.getJavaTypeMapping(i);
UniqueMetaData umd = embFieldMapping.getFieldMetaData().getUniqueMetaData();
if (umd != null)
{
CandidateKey ck = TableUtils.getCandidateKeyForField(this, umd, embFieldMapping);
if (ck != null)