我想通过动态地将序列名称
order_sequence
传递给这个类来重用计数器,如何实现呢?public class Counter {
@Id
@GeneratedValue(generator = "sequence-generator")
@GenericGenerator(name = "sequence-generator", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", parameters = {
@Parameter(name = "sequence_name", value = "order_sequence"),
@Parameter(name = "initial_value", value = "1"), @Parameter(name = "increment_size", value = "1") })
private Long counter;
}