throw new IllegalStateException("Class '" + pojo.getClass() + "' is not a registered @Subclass");
else
return translator.save(pojo, index, ctx, path);
} else {
// This is a normal save
PropertyContainer into = creator.save(pojo, index, ctx, path);
populator.save(pojo, index, ctx, path, into);
if (discriminator != null) {
into.setUnindexedProperty(DISCRIMINATOR_PROPERTY, discriminator);
if (!indexedDiscriminators.isEmpty())
into.setProperty(DISCRIMINATOR_INDEX_PROPERTY, indexedDiscriminators);
}
return into;
}
}