我有使用序列生成id的实体
@Id
@SequenceGenerator(name = "ENTITY_SEQ", sequenceName = "ENTITY_SEQ", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ENTITY_SEQ")
@Column(name = "ID", unique = true, nullable = false)
public Long getId() {
return id;
}
它运作正常。但是当我进行折磨测试并设置id manualy时,序列重写值并设置它自己的值。是否有可能将设置值的优先级更改为ID?