# Multiple Primary keys lead to bug when creating a new record \[Apr 26\]

**URL:** https://community.nocodb.com/t/multiple-primary-keys-lead-to-bug-when-creating-a-new-record-apr-26/391
**Category:** Discord-Discussions
**Created:** [November 3, 2022, 9:01am UTC](https://community.nocodb.com/t/multiple-primary-keys-lead-to-bug-when-creating-a-new-record-apr-26/391 "2022-11-03T09:01:25Z")
**Posts on this page:** 5
**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, 9:01am UTC](https://community.nocodb.com/t/multiple-primary-keys-lead-to-bug-when-creating-a-new-record-apr-26/391/1 "2022-11-03T09:01:25Z")

</div>

[dummy title body text appended to avoid empty title body]

---

<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, 9:01am UTC](https://community.nocodb.com/t/multiple-primary-keys-lead-to-bug-when-creating-a-new-record-apr-26/391/2 "2022-11-03T09:01:26Z")

</div>

> 🙋‍♂️ **Billy Le Bordelais** _replied_

#### Hello, I created a new table with a custom primary key but when I create a new record, the app raise the error : `Undefined binding(s) detected when compiling FIRST. Undefined column(s): [shop_id] query: select "shops"."id" as "Id", "shops"."created_at" as "CreatedAt", "shops"."updated_at" as "UpdatedAt", "shops"."shop_id" as "shop_id" from "shops" where "id" = ? and "shop_id" = ? limit ?`

#

---

<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, 9:01am UTC](https://community.nocodb.com/t/multiple-primary-keys-lead-to-bug-when-creating-a-new-record-apr-26/391/3 "2022-11-03T09:01:27Z")

</div>

> 🙋‍♂️ **Billy Le Bordelais** _replied_

#### Here is a video of the steps

[Screencast\_2022-04-25\_175034.webm](https://cdn.discordapp.com/attachments/968179312597553252/968179453417099284/Screencast_2022-04-25_175034.webm)

#

---

<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, 9:01am UTC](https://community.nocodb.com/t/multiple-primary-keys-lead-to-bug-when-creating-a-new-record-apr-26/391/4 "2022-11-03T09:01:28Z")

</div>

> 🙋‍♂️ **Billy Le Bordelais** _replied_

#### Am I missing a point with the “PK” option or is it a bug ?

#

---

<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, 9:01am UTC](https://community.nocodb.com/t/multiple-primary-keys-lead-to-bug-when-creating-a-new-record-apr-26/391/5 "2022-11-03T09:01:29Z")

</div>

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

* * *

#### 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/)
