标签: database sharding
我想基于某个键@Entity @Table(name = "table_b") public class TableB { @Id @Column(name = "id") private Long id; @OneToOne @JoinColumn(name = "id") private TableA tableA; } 对我的(发布)数据库进行分片,并且该分片应该只能由特定的数据库用户访问。有可能吗?
@Entity @Table(name = "table_b") public class TableB { @Id @Column(name = "id") private Long id; @OneToOne @JoinColumn(name = "id") private TableA tableA; }