db_list doesn't show '0' values
Values '0' aren't shown in db_list, neither if given by Sring nor by Int.
Furthermore Single-View saves '0' as Int but all fields are shown with value '0' even if there is no entry in database.
TypeHandling has to be included because some tables need explicit '0'-Values and controlling the entries is impossible with current behavior.
(issue imported from #M11875)
#2 Updated by David Bruchmann about 11 years ago
when you have saved a Value '0' in the Database db_list doesn't show it.
You can work with that '0' in extensions or you can show it in Frontend but
you can't control it by db_list in Backend.
In Listview db_list shows nothing and in singleview all empty integerfields show '0' too, so it's impossible to distinguish the saved one from the others.
I remarked that by building a static table where '0' is just a value for an option (http://en.wikipedia.org/wiki/ISO_5218). And having '0' is not the same as nothing.
#7 Updated by David Bruchmann about 11 years ago
The Patch helped for db_list but not for the editform with eval=int in TCA
I have installed it on version 4.2.8 some where some lines of the class look a bit different as in your patch but I don't think that this makes a difference.
I added another Screenshot to explain the problem.
#9 Updated by David Bruchmann about 11 years ago
The Patch works and fixes the required changes - +1 by Testing.
The mentioned misbehavior in editform is a configuration-item in TCA and can be fixed by setting click=>'' instead of click=>'0' upon 'config'.
TCA['TABLENAME'] = Array(
'columns' => array(
'FIELDNAME' => array(
'config' => array (
'type' => 'input',
'size' => '2',
'max' => '1',
'eval' => 'int',
'checkbox' => '', ##### << Here it is, the solution
'range' => array (
'upper' => '9',
'lower' => '0'
'default' => 0