Php 比斯纳原则2.1和;2.2注释“@表「;从来没有进口过

Php 比斯纳原则2.1和;2.2注释“@表「;从来没有进口过,php,zend-framework,doctrine,Php,Zend Framework,Doctrine,我习惯于使用zend mvc以及与bisna驱动程序绑定在一起的doctrine 2.1和2.2 对于新项目,我使用注释驱动程序只是为了方便(我不这么认为)。我如何从数据库生成实体并尝试加载它们,但它们不断生成错误: [Semantical Error] The annotation "@Table" in class MyWheels\Entity\Bmulog was never imported. 我尝试向它们添加ORM\前缀,但这并不能解决问题 我的配置文件读取: [productio

我习惯于使用zend mvc以及与bisna驱动程序绑定在一起的doctrine 2.1和2.2

对于新项目,我使用注释驱动程序只是为了方便(我不这么认为)。我如何从数据库生成实体并尝试加载它们,但它们不断生成错误:

[Semantical Error] The annotation "@Table" in class MyWheels\Entity\Bmulog was never imported.
我尝试向它们添加ORM\前缀,但这并不能解决问题

我的配置文件读取:

[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" 
有人知道这里出了什么问题吗

我的实体代码是:

<?php

namespace MyWheels\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * MyWheels\Entity\Bmulog
 *
 * @Table(name="bmulog")
 * @Entity
 */
class Bmulog
{
    /**
     * @var integer $id
     *
     * @Column(name="id", type="integer", nullable=false)
     * @Id
     * @GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var text $request
     *
     * @Column(name="request", type="text", nullable=false)
     */
    private $request;

    /**
     * @var text $responce
     *
     * @Column(name="responce", type="text", nullable=false)
     */
    private $responce;

    /**
     * @var string $ip
     *
     * @Column(name="ip", type="string", length=200, nullable=false)
     */
    private $ip;

    /**
     * @var string $browser
     *
     * @Column(name="browser", type="string", length=200, nullable=false)
     */
    private $browser;

    /**
     * @var datetime $date
     *
     * @Column(name="date", type="datetime", nullable=false)
     */
    private $date;


}

使用
条令\ORM\Mapping
意味着添加导入别名作为条令注释标记的前缀

@ORM\Table
@ORM\Entity
@ORM\Column
@ORM\... (Any Doctrine annotation)

可能会有帮助-它基本上说明了问题是的:D。我现在只是在使用2.0原则和一些默认库,我发现了一些可行的地方。。但我不知道为什么它没有错
@ORM\Table
@ORM\Entity
@ORM\Column
@ORM\... (Any Doctrine annotation)