Set @Column(name = "element") on @ElementCollection attributes

MSAL

When an attribute is annotated with @ElementCollection, a separate table is created for the attribute that includes the attribute ID and value. In OpenJPA, the column for the annotated attribute is named element, whereas EclipseLink names the column based on the name of the attribute. To remain compatible with tables that were created with OpenJPA, add a @Column annotation with the name attribute set to element.

org.openrewrite.java.migrate.javax.AddColumnAnnotation
mod run . --recipe=org.openrewrite.java.migrate.javax.AddColumnAnnotation

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.