我想使用sequence
自动生成hibernate
:
@Entity
@Table(name = "my_entity", schema = "test")
public static class MyEntity {
private static final String SEQUENCE = "my_seq";
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE)
@SequenceGenerator(name = SEQUENCE, sequenceName = SEQUENCE, schema = "test")
private Long id;
}
结果:序列在架构public
中生成。为什么呢?