Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong storage of UUIDs when creating new M2A items #11417

Closed
3 tasks done
cs-jbe opened this issue Feb 3, 2022 · 2 comments
Closed
3 tasks done

Wrong storage of UUIDs when creating new M2A items #11417

cs-jbe opened this issue Feb 3, 2022 · 2 comments

Comments

@cs-jbe
Copy link

cs-jbe commented Feb 3, 2022

Preflight Checklist

Describe the Bug

We have a collection that has a child collection as a M2A relationship.
When adding new items to the child collection using the "Create New" button in the parent collection, the UUID of the newly created item is stored as a lowercase UUID in the relationship table. If you add an item with "Add Existing" instead, the UUID will be stored uppercase in the relationship table.
image (2)

All items that are stored with a lowercase UUID in the relationship table cannot be edited via the parent collection. If you open such a new created item for editing, all fields remain empty.
image
image

This and similar behavior is also described in other issues. As soon as you edit all UUIDs in the relationship table to uppercase they are editable in Directus again.

We suspect that either the "Create New" button stores wrong UUIDs or an internal filter does not filter them correctly.

To Reproduce

Create tables "Movies" and "Actors". Add a M2A relationship to the "Movies" table referencing the "Actors" table.
Animation8

Errors Shown

No errors shown.

What version of Directus are you using?

9.5.0

What version of Node.js are you using?

Directus Docker Image

What database are you using?

Azure SQL (MSSQL latest stable)

What browser are you using?

Chrome (97), Edge

What operating system are you using?

Local Windows / Azure Linux

How are you deploying Directus?

(Azure + Local) Docker

@cs-jbe cs-jbe changed the title Wrong UUID generation when creating new M2A items Wrong storage of UUIDs when creating new M2A items Feb 3, 2022
@Oreilles Oreilles added this to the Relational Interfaces milestone Feb 10, 2022
@rijkvanzanten rijkvanzanten removed this from the Relational Interfaces milestone Jun 30, 2022
@rijkvanzanten
Copy link
Member

Linear: ENG-271

@azrikahar
Copy link
Contributor

I believe this is actually the same issue reported in #16671, especially since both are MS SQL specific and the same "symptom" of lowercased UUID(s) in M2A junction table. Since #16691 has resolved it, marking this as resolved as well 👍

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants