// XXX: needs to create based on the discriminator with inheritance.
// Create a new entity for the given class and primary key.
try {
entity = (Entity) load(cl, key, isEager);
} catch (AmberException e) {
throw new AmberRuntimeException(e);
}
}
else {
// HelperBean__Amber -> HelperBean
String className = cl.getSuperclass().getName();