spring数据jpa如何映射分割表?

时间:2018-01-05 09:15:12

标签: mapping spring-data-jpa

Spring数据JPA映射如何拆分表? 我已经有了一个Entity类:

@Entity
@Table(name = "tbl_attendance_teacher_result")
@Data
public class AttendanceRecord extends          TimeEntity {
@EmbeddedId
private AttendanceRecordPrimaryKey id;

private int gid;

private String teacherName;
}

但现在我想用gid拆分表tbl_attendance_teacher_result; 表名如 tbl_attendance_teacher_result_1tbl_attendance_teacher_result_2 ......等等。

我应该如何修改实体类?

0 个答案:

没有答案