@AttributeOverride for ID creating invalid database update scripts


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:

    @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?

I have same problem, I need to change the name and length of the id field

@AttributeOverride(name="id", column=@Column(name="ID_PROCESO", length=10)

but it is not taken into account for the generation of the script

Dear team,
do you have any plan to fix this issue?