I have a model that looks like this:
@MappedSuperclass
@AccessType("field")
public abstract class BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO, generator = "generator")
@Column(name = "ID")
private Long id;
}
@Entity
@Table(name = "MODEL")
@AccessType("field")
public class Model extends BaseEntity {
@Column(name="ABC")
private String abc;
}
No matter what I try I cannot seem to be able to move the location of the ID column in the generated INSERT or UPDATE sql queries. ID always ends up as the last column:
insert into MODEL (ABC, ID) values (?, ?)
Is there any way to force it otherwise?