I've created a new entity in src/Andrei/StatisticsBundle/Entity/Attribute/Value/ButtonVarchar.php. Here is the code for this class:
<?php
namespace Andrei\StatisticsBundle\Entity\Attribute\Value;
class ButtonVarchar
{
protected $value;
}
and in src/Andrei/StatisticsBundle/Resources/config/doctrine/ButtonVarchar.yml I defined the following mapping information:
Andrei\StatisticsBundle\Entity\Attribute\Value\ButtonVarchar:
type: entity
table: button_attribute_value_varchar
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
value:
type: string
length: 255
manyToOne:
button:
targetEntity: Button
inversedBy: attributeValues
joinColumn:
name: button_id
referencedColumnName: id
For some reason when I run php app/console doctrine:generate:entities I get the following error:
[RuntimeException] Namespace "Andrei\StatisticsBundle\Entity\Attribute\Value" does not contain any mapped entities.
I can't understand why is this happening. Can someone point me to the right direction? Thank you.
Did you add your StatisticsBundle to Doctrine config?
eg:
You can see mapping problem in the following link:
https://github.com/symfony/symfony/pull/675
It seems that your entities are separated into fine grained packages. In that case you need to specify
fully qualified namespace
in order for it to work.It may also help.
This works:
This doesn't work: