Bug #37257

NULL on IntegerConverter

Added by Carsten Bleicker about 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Could have
Category:
Property
Start date:
2012-05-17
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Yes
Complexity:

Description

hi folks,
f.e. i have a model wich holds a property "maxOrders".
NULL represents "unlimited"
0 represents 0
1 represents 1
...

so i have an input field where the user should be able to empty it with the
result that db field contains NULL (unlimited)

so in my humble oppinion the integer converter should convert nothing to null.
maybe in combination with a check of @ORM\Column(nullable=true)?
maybe the combination with @ORM\Column(nullable=true) could be also in any other converter?

kind regards
carsten


Files

IntegerConverter.php (1.75 KB) IntegerConverter.php Carsten Bleicker, 2012-05-18 14:20
PropertyMapper.php (13.9 KB) PropertyMapper.php Carsten Bleicker, 2012-05-24 17:23
PropertyMapper.php (14.1 KB) PropertyMapper.php Carsten Bleicker, 2012-05-24 18:20

Also available in: Atom PDF