Field cardinality stored twice
yched - July 2, 2009 - 21:51
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | field system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
The {field_config} table has a dedicated 'cardinality' column, but the cardinality also ends up in the serialized 'data' column.
Attached patch removes cardinality from 'data' - although I think at some point long ago we raised the question of which properties deserved actual columns vs. going in the 'data'. Answer was "the properties you'd need in the WHERE section when using field_read_fields() or field_read_instances()".
I'm not sure cardinality fits this definition...
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| field_config_cardinality.patch | 880 bytes | Idle | Passed: 11567 passes, 0 fails, 0 exceptions | View details | Re-test |

#1
#2
I'm not too fond of the "unset() to prevent saving in data column" pattern that we have here and in users table. But, this patch is just a simple bug fix so RTBC
#3
Committed to CVS HEAD. Thanks!
#4
Automatically closed -- issue fixed for 2 weeks with no activity.