Quantcast
Channel: Commentaires sur : Add new Data Type in Doctrine 2 in Symfony 2
Viewing all articles
Browse latest Browse all 11

Par : Jeppe

$
0
0

IT worked, thanks a lot Jordan.

For anyone else, note that the EM is not present during build(), so it needs to be placed in boot(). I ended up having the following:

public function boot() {
Type::addType(‘geometry’, ‘Acme\AutoscriptBundle\ORM\GeometryType’);
$em = $this->container->get(‘doctrine.orm.default_entity_manager’);
$conn = $em->getConnection();
$conn->getDatabasePlatform()->registerDoctrineTypeMapping(‘geometry’, ‘geometry’);
}


Viewing all articles
Browse latest Browse all 11

Trending Articles