datanucleus-core icon indicating copy to clipboard operation
datanucleus-core copied to clipboard

Enhancement contract : dnNewObjectIdInstance() with compound PK when using persistent properties is generated incorrect for JPA

Open andyjefferson opened this issue 8 years ago • 0 comments

When enhancing with JPA and the entity has a compound PK and uses properties, the enhanced class has an incorrect dnNewObjectIdInstance method. It currently is generated as

public final Object dnNewObjectIdInstance(Object key) { return new CompoundPK2((String) key); }

but the compound pk has no String constructor since it's not a JPA requirement

andyjefferson avatar Apr 11 '16 07:04 andyjefferson