DDC-574: PHP Mapping Driver generates notnull => false, instead of nullable => true #5080

doctrinebot opened this Issue May 6, 2010 · 4 comments

2 participants


Jira issue originally created by user andyajadeh:

I tried to import a schema from postgresql database, to a php file mapping.
I had created that database using doctrine schema tool with annotation mapping.

to import it, I used:

php doctrine orm:convert-mapping --from-database php ./php

and I got something like:


use Doctrine\ORM\Mapping\ClassMetadataInfo;

   'name' => 'mdp',
   'id' => true,
   'fieldName' => 'id',
   'columnName' => 'id',
   'type' => 'integer',
   'fieldName' => 'rrn',
   'columnName' => 'rrn',
   'type' => 'string',
   'length' => 50,
   'fixed' => false,
   'notnull' => false,


When I try to drop & create the database using this php mapping, the "notnull => false" doesn't work.
The column definition in the database is still NOT NULL. But when I add "nullable => true", it works like I expected (DEFAULT NULL::character varying)


Comment created by shurakai:

Hi Andy,

do you think you could add such a .sql testfile for us? I will look into this shortly afterwards.

Thanks for helping!


Comment created by andyajadeh:

this is my table I imported. thanks.


Issue was closed with resolution "Fixed"

@jwage jwage was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0-BETA2 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment