摘要:
一本书可以有多个作者,一个作者可以有多本书 @Entity public class Book { @Id String isbn; String title; @ManyToMany(mappedBy = "books") Collection<Author> authors; } @Entity 阅读全文
posted @ 2019-02-12 18:56
江湖小小白
阅读(552)
评论(0)
推荐(0)
摘要:
手机数量和手机详情分开存 @Entity public class Phone { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; String number; @OneToOne // Phone 表会添加 deta 阅读全文
posted @ 2019-02-12 12:01
江湖小小白
阅读(2436)
评论(0)
推荐(0)

浙公网安备 33010602011771号