directus/v6-archive
O2M Fails silently when wrong datatype is used for related table
Offen
#21 geöffnet am 25.10.2018
5. TrivialInterfacebughelp wantedv6
Repository-Metriken
- Stars
- (2 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
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.