directus/v6-archive
O2M Fails silently when wrong datatype is used for related table
Aberta
#21 aberto em 25 de out. de 2018
5. TrivialInterfacebughelp wantedv6
Métricas do repositório
- Stars
- (2 estrelas)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
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.