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
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...

AttachmentSizeStatusTest resultOperations
field_config_cardinality.patch880 bytesIdlePassed: 11567 passes, 0 fails, 0 exceptionsView details | Re-test

#1

yched - July 3, 2009 - 17:59
Status:active» needs review

#2

moshe weitzman - July 4, 2009 - 03:30
Status:needs review» reviewed & tested by the community

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

Dries - July 4, 2009 - 06:20
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks!

#4

System Message - July 18, 2009 - 06:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.