I have Symfony project, in which there are 2 entities - Building and Building_type. They are connected with ManyToMany uni-directional association. So, when I try to access
Because the name of the entity contains an underscore _
and the PSR-0 autoloader will try to find it in Farpost/StoreBundle/Entity/Building/type.php
.
You need to rename your class to BuildingType
and put it in Farpost/StoreBundle/Entity/BuildingType.php
Also, make sure that your composer.json
has proper entries pointing to proper namespace. Mine did not, causing this error.