# Problem with links when deleting

**URL:** <https://community.nocodb.com/t/problem-with-links-when-deleting/1472>\
**Category:** Grid-View\
**Created:** [November 12, 2024, 8:16am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472 "2024-11-12T08:16:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Sergey](https://community.nocodb.com/u/Sergey)\
**Post date:** [November 12, 2024, 8:16am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/1 "2024-11-12T08:16:22Z")

</div>

Hello! I’m facing this problem. In a table there is a field link to another table in M2M format. After deleting a record in the table and then adding a new one, the links that were in the deleted record reappear in the new one. Thus it turns out that to delete a record in the table correctly, you must first delete all the links in this record and only then delete the record. This problem occurs exactly with M2M links, with all other links it is normal. It is very inconvenient. Is this really how it should work? I have recorded a video, but unfortunately I cannot attach it.

---

<div class="post-metadata">

**Author:** ![dstala](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@dstala](https://community.nocodb.com/u/dstala)\
**Post date:** [November 12, 2024, 9:00am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/2 "2024-11-12T09:00:37Z")

</div>

Can you share your base information? Are you trying it in Cloud or self hosted environment?

---

<div class="post-metadata">

**Author:** ![Sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Sergey](https://community.nocodb.com/u/Sergey)\
**Post date:** [November 12, 2024, 9:21am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/3 "2024-11-12T09:21:43Z")

</div>

Good day. Self hosted.

> **[NocoDBProblem Links M2M.mp4](https://drive.google.com/file/d/1RlYfBfD6SBangoz144pyHt-fAmJEicHg/view?usp=drive_link)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![dstala](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@dstala](https://community.nocodb.com/u/dstala)\
**Post date:** [November 16, 2024, 4:48am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/4 "2024-11-16T04:48:03Z")

</div>

Copy your base information here. [FAQs | NocoDB](https://docs.nocodb.com/FAQs#how-to-check-my-project-info-)

---

<div class="post-metadata">

**Author:** ![dstala](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@dstala](https://community.nocodb.com/u/dstala)\
**Post date:** [November 16, 2024, 4:49am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/5 "2024-11-16T04:49:14Z")

</div>

I tried it in [app.nocodb.com](http://app.nocodb.com) (uses PG), it worked fine. Just wondering if its something to do with other NC\_DB options (MySQL or SQLite)

---

<div class="post-metadata">

**Author:** ![dstala](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@dstala](https://community.nocodb.com/u/dstala)\
**Post date:** [November 16, 2024, 4:58am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/6 "2024-11-16T04:58:42Z")

</div>

Reproducible with SQLite as root DB. Created an issue here

> <https://github.com/nocodb/nocodb/issues/9832>
>
> \### Please confirm that the bug report does \*\*\*not\*\*\* already exist
> 
> \- \[X\] I con…firm there is no existing issue for this bug.
> 
> \### Steps to reproduce
> 
> https://community.nocodb.com/t/problem-with-links-when-deleting/1472
> https://drive.google.com/file/d/1RlYfBfD6SBangoz144pyHt-fAmJEicHg/view
> 
> \### Desired Behavior
> 
> Link should not reappear on new record creation
> 
> \### Project Details
> 
> 258.0
> 
> \### Attachments
> 
> \_No response\_

---

<div class="post-metadata">

**Author:** ![Sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Sergey](https://community.nocodb.com/u/Sergey)\
**Post date:** [November 16, 2024, 5:58am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/7 "2024-11-16T05:58:14Z")

</div>

Node: **v20.15.1**  
Arch: **x64**  
Platform: **linux**  
Docker: **true**  
RootDB: **sqlite3**  
PackageVersion: **0.257.2**

---

<div class="post-metadata">

**Author:** ![Sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Sergey](https://community.nocodb.com/u/Sergey)\
**Post date:** [November 16, 2024, 6:00am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/8 "2024-11-16T06:00:59Z")

</div>

Thank you. Can you tell me then how can I change the root db in my self host solution

---

<div class="post-metadata">

**Author:** ![dstala](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@dstala](https://community.nocodb.com/u/dstala)\
**Post date:** [November 18, 2024, 6:57am UTC](https://community.nocodb.com/t/problem-with-links-when-deleting/1472/9 "2024-11-18T06:57:41Z")

</div>

> **[GitHub - nocodb/nocodb: 🔥 🔥 🔥 Open Source Airtable Alternative](https://github.com/nocodb/nocodb?tab=readme-ov-file#installation)**
>
> 🔥 🔥 🔥 Open Source Airtable Alternative
