directus/v6-archive

O2M Fails silently when wrong datatype is used for related table

Ouverte

#21 ouverte le 25 oct. 2018

 (0 commentaire) (0 réaction) (0 personne assignée)JavaScript (4 forks)auto 404
5. TrivialInterfacebughelp wantedv6

Métriques du dépôt

Stars
 (2 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

From directus created by rijkvanzanten : directus/directus#2006

Version Info

  • Directus version and branch: 6.4.5 release

Behavior

When the "wrong" datatype is used for the related primary key field, the O2M doesn't display the selected values. They are saved however.

For example in this table structure:

Table A

column interface datatype
id primary_key INT
relation one-to-many ALIAS

Table B

column interface datatype
title text_input VARCHAR
table_a_id text_input VARCHAR

The selected items won't be displayed in the interface. For some reason, this is caused by the fact that table_a_id is set to a VARCHAR type, instead of matching the INT of the id it is going to store.

Schema Dump, Logs, or Screenshots

one-to-many-dump.sql.txt

Guide contributeur