Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何在这种情况下正确设置关系
有Article和Location实体。
Article
Location
在任何时间点,一篇文章只能在一个位置,从另一侧看,一个位置可以容纳一篇或多篇文章。
那么这是一种什么样的关系呢?
从一侧是一对一,从另一侧是多对一。
谢谢
一个位置可以有很多文章,这是一对多的关系。
关系的ONELocation 一侧表示所有文章只能有一个位置,Article 一侧的“MANY”表示任何位置都可以有许多文章。
ONE