it is a way to have a field in an entity whith option nullable=true, unique=true ?
I try to do it, and I have an error when I update the database schema :
/**
 * @var string
 *
 * @ORM\Column(name="code", type="string", length=16, nullable=true, unique=true)
 */
private $code;
And the console :
php bin/console doctrine:schema:update --force
Updating database schema...
[Doctrine\DBAL\Exception\UniqueConstraintViolationException]                 
An exception occurred while executing 'CREATE UNIQUE INDEX 
UNIQ_6EEAA67DE76  
8E439 ON commande (code)':                                            
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 
'' fo  
r key 'UNIQ_6EEAA67DE768E439'
