# Has Many \[Sep 01\]

**URL:** <https://community.nocodb.com/t/has-many-sep-01/658>\
**Category:** Discord-Discussions\
**Created:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658 "2022-11-03T10:41:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/1 "2022-11-03T10:41:35Z")

</div>

> 🙋‍♂️ **Eric** _asked_

## trying to setup a conventional one to many relationship between two tables, in the linkToAnotherRecord ui i see only `has Many` `Many To Many` options and nothing for `One to Many`. is there a different way I should define this type of relatinship? In the documentation is see that there is a foreign key value, but it doesn’t seem to appear for my when i create fields.

#### 

#### I saw there had been changes in the most recent versions, and updated to latest (0.92.4) and still don’t see that datatype.

#### 

#### 

#### this [github issue](https://github.com/nocodb/nocodb/issues/525#issue-993335776) seems to show the exact design flow, but in all recent tags of the source this datatype is commented out.

 ![image0](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/a7dbb69fc816d2b3523aec0a95aca38e574aebb0.png)

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/2 "2022-11-03T10:41:36Z")

</div>

> 💁 **o1lab** _replied_

#### Has Many is One to Many

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/3 "2022-11-03T10:41:38Z")

</div>

> 🙋‍♂️ **Eric** _replied_

#### well conceptually, but it also bakes in exclusivity from the perspective of the parent.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/4 "2022-11-03T10:41:39Z")

</div>

> 🙋‍♂️ **Eric** _replied_

#### e.g. if i define one to many in the current interface, if i assign a link value from the parent, it removes that from other peers. so not sure if it’s just a bug/quirk in the current implementation.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/5 "2022-11-03T10:41:40Z")

</div>

> 🙋‍♂️ **Eric** _replied_

#### e.g.

[firefox\_6j1ayhc7Xf.mp4](https://cdn.discordapp.com/attachments/1011384718060695704/1011409681618575520/firefox_6j1ayhc7Xf.mp4)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/6 "2022-11-03T10:41:41Z")

</div>

> 🙋‍♂️ **Russell** _replied_

#### A **Device** can have many **current\_cal** , but a **current\_cal** can only have one **Device**. In the **current\_cal** table there should be a column for **Devices\_id** which only holds an integer ID. So if you assign _“this is a yaml 1”_ to Device ID 2, it will no longer be assigned to Device ID 1. So it seems like it’s working as expected, or do you want many-to-many, or did you want one-to-many in the opposite direction?

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/7 "2022-11-03T10:41:42Z")

</div>

> 🙋‍♂️ **Eric** _replied_

#### The desire is to have a conventional foreign key, in the context desribed here, yes running in the opposite direction… a foreign key from one table to another would not generally impart or enforce any exclusivity (across) the members of the parent table.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/8 "2022-11-03T10:41:43Z")

</div>

> 🙋‍♂️ **Eric** _replied_

#### e.g. one should be able to (re) use the foreign keys values; many parent entities having the same foreign key value.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/9 "2022-11-03T10:41:44Z")

</div>

> 🙋‍♂️ **Eric** _replied_

#### from looking at the docs it appeared that this exists, but maybe rolled into the linked

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/10 "2022-11-03T10:41:46Z")

</div>

> 🙋‍♂️ **Eric** _replied_

#### \<@531097245194387457\> it looks like we have the same question/need.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:41am UTC](https://community.nocodb.com/t/has-many-sep-01/658/11 "2022-11-03T10:41:47Z")

</div>

[Autogenerated from discord](https://discord.com/channels/661905455894888490/1011384718060695704)

* * *

#### Join [NocoDB’s](http://www.nocodb.com/) community

[Discord](https://discord.gg/5RgZmkW) • [Twitter](https://twitter.com/nocodb) • [Reddit](https://www.reddit.com/r/NocoDB/) • [Docs](https://docs.nocodb.com/)
