Hi:
I have an entity created from a pre-existing database where the ID field is named “BATCHNUM”. I have the following code in my Entity:
@AttributeOverrides({
@AttributeOverride(name = "id", column = @Column(name = "BATCHNUM"))
})
I have no actual entry in my Entity for “BATCHNUM” as it creates duplicate definitions according to Eclipselink.
See BaseLongIDEntity when primary key is not named “ID”
The problem is that, when I do this, an update script gets created that DROPS my BATCHNUM field from my table! The primary key field disappears, so of course nothing works.
It appears there is a bug in the update script creator. It is not seeing the @AttributeOverrides.
Can you check to see if this is the case and issue a fix?