@TableGenerator(name = "id_generator", //生成器的名称,与generator值对应
table="id_generator", //记录主键的表
allocationSize=1, //每次加一
pkColumnName="gen_name", // 表用于标识区分主键
valueColumnName="gen_value", //主键的值
pkColumnValue="t_role_id" // gen_name 的值
)
@Id
@GeneratedValue(strategy=GenerationType.TABLE,generator="id_generator")
@Id
@SequenceGenerator(name="role_sequence",sequenceName="seq_t_role")
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="role_sequence")
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)