if you want to use a one-to-many relationship you should use a join table instead.
如果你想用一个一对多的关系,你应该使用一个连接表来代替。
if i were to use a relational table structure to design this relationship, i」d need at least three tables: the third being a join table linking a many-to-many relationship.
change the join table separator to an underline (「_」) and change the name of the database schema.
将join table分隔符更改为一个下划线(「_」)并更改数据库模式(schema)的名称。
the join table allows you to persist books with a single author as well as books with multiple authors.
连接表允许将具有一个作者的图书和具有多个作者的图书持久化。
how to create an association that sets join table attributes automatically?
如何创造一套联接表的属性自动关联吗?
testing the subject and subscription association means we must access both the data in the subjects and the subscriptions table, as well as the join table subjects_subcriptions.