dflydev / dflydev-doctrine-orm-service-provider

Doctrine ORM Service Provider
MIT License
209 stars 59 forks source link

Problem with metadata entities #33

Closed argentinaluiz closed 10 years ago

argentinaluiz commented 10 years ago

I'm using version 1.0.5 and when run generate-entities, display No metadata process. My paths are correct. I use composer e my directory is src/JS/Entity

$app->register(new DoctrineOrmServiceProvider, array(
    "orm.em.options" => array(
        "mappings" => array(
            array(
                "type" => "annotation",
                "namespace" => "JS\Entity",
                "path" => __DIR__ ."/JS/Entity"
                ),
            ),
        )
    ));
$ormConfig = $app['orm.em']->getConfiguration();

$ormConfig->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), [
            __DIR__ ."/JS/Entity"
        ]));
dominikzogg commented 10 years ago

@argentinaluiz do you added this: https://github.com/dflydev/dflydev-doctrine-orm-service-provider#why-arent-my-annotations-classes-being-found

argentinaluiz commented 10 years ago

@dominikzogg When I added this works.

$ormConfig->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), [
            __DIR__ ."/JS/Entity"
        ]));

I don't changed use_simple_annotation_reader.

argentinaluiz commented 10 years ago

I added use_simple_annotation_reader and works, thanks!