Skip to content

Question: No Metadata Classes to process. #46

@mikebell

Description

@mikebell

I'm trying to get this working in Silex but struggling when setting it up.

I get "No Metadata Classes to process." when trying to create the schema through my console app.

The schema validates fine if I run orm:validate-schema

Below is my config. Example\Api\Entities is mapped to "src/Example/Api/Entities" in my composer.json file (similar namespaces are working)

"orm.em.options" => array(
    "mappings" => array(
        // Using actual filesystem paths
        array(
            "type" => "annotation",
            "namespace" => "Example\Api\Entities",
            "path" => __DIR__."/../src/Example/Api/Entities",
        ),
    ),
),

Changing the path to a none existant path breaks validate-schema as expected.

This is my entity file

<?php

namespace Example\Api\Entities;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="example")
 */
class Example
{
/**
 * @ORM\Column(type="integer")
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="AUTO")
 */
protected $id;

/**
 * @ORM\Column(type="string", length=100)
 */
protected $name;

/**
 * @ORM\Column(type="decimal", scale=2)
 */
protected $price;

/**
 * @ORM\Column(type="text")
 */
protected $description;
}

I'm not really sure how to fix this. Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions