Skip to content

Instantly share code, notes, and snippets.

@guilhermeblanco
Last active September 27, 2016 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilhermeblanco/d565089e5209be8483ec1ea790a652c2 to your computer and use it in GitHub Desktop.
Save guilhermeblanco/d565089e5209be8483ec1ea790a652c2 to your computer and use it in GitHub Desktop.
<?php
$column = new Column("email", Type::getType("string"));
$column->setLength(255);
$column->setNullable(true);
$classMetadata->getTable()->addColumn($column);
$value = new SimpleValue();
$value->setTable($classMetadata->getTable());
$value->setTypeName("string");
$value->addColumn($column);
$property = new Property("email");
$property->setValue($value);
$classMetadata->addProperty($property);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment