directus/v6-archive

O2M Fails silently when wrong datatype is used for related table

开放

#21 创建于 2018年10月25日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (4 个派生)auto 404
5. TrivialInterfacebughelp wantedv6

仓库指标

星标
 (2 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南