directus/v6-archive
O2M Fails silently when wrong datatype is used for related table
開放
#21 建立於 2018年10月25日
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.