I am using zend mvc along with the exercises 2.1 and 2.2 related to the bisna driver.
For a new project, I use the annotation driver just for convenience (i thout). As soon as I created my object from the database and tried to load them, but they continue to generate an error:
[Semantical Error] The annotation "@Table" in class MyWheels\Entity\Bmulog was never imported.
I tried adding the ORM \ prefix to them, but that did not solve it.
my config file read's:
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
pluginPaths.Bisna\Application\Resource\ = "Bisna/Application/Resource"
autoloaderNamespaces[] = Bisna
autoloaderNamespaces[] = Doctrine
autoloaderNamespaces[] = MyWheels
autoloaderNamespaces[] = Symfony
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.doctrine.cache.instances.default.namespace = "Application_"
resources.doctrine.dbal.connections.default.parameters.dbname = "mywheels"
resources.doctrine.dbal.connections.default.parameters.user = "root"
resources.doctrine.dbal.connections.default.parameters.password = ""
resources.doctrine.orm.entityManagers.default.metadataDrivers.drivers.0.adapterClass = "Doctrine\ORM\Mapping\Driver\AnnotationDriver"
resources.doctrine.orm.entityManagers.default.metadataDrivers.drivers.0.mappingNamespace = "MyWheels\Entity"
resources.doctrine.orm.entityManagers.default.metadataDrivers.drivers.0.mappingDirs[] = APPLICATION_PATH "\..\library\MyWheels\Entity"
resources.doctrine.orm.entityManagers.default.metadataDrivers.drivers.0.annotationReaderClass = "Doctrine\Common\Annotations\AnnotationReader"
will anyone tell me what is going wrong here?
my entity code:
<?php
namespace MyWheels\Entity;
use Doctrine\ORM\Mapping as ORM;
class Bmulog
{
private $id;
private $request;
private $responce;
private $ip;
private $browser;
private $date;
}
Doctrine 2.2.0 leads to about the same error:
[Semantical Error] The annotation "@Doctrine\ORM\Mapping\Table" in class MyWheels\Entity\Bmulog does not exist, or could not be auto-loaded.
source
share