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_1
,
tbl_attendance_teacher_result_2
......等等。
我应该如何修改实体类?