5
나는 bisland 드라이버와 함께 묶인 doctrine 2.1과 2.2와 함께 zend mvc를 사용하는 데 익숙합니다. 난 그냥 conveniance에 대한 주석 드라이버를 사용하고 새로운 프로젝트에 대한 Bisna doctrine 2.1 & 2.2 주석 "@Table"을 가져 오지 않았습니다
(내가 보없이) 괜찮나 내 기업의 데이터베이스에서 생성 한 그들을로드 tryed 적이 있지만 오류 발생 유지 :[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;
}
교리 같은 오류에 대한에 2.2.0 결과 :
는[Semantical Error] The annotation "@Doctrine\ORM\Mapping\Table" in class MyWheels\Entity\Bmulog does not exist, or could not be auto-loaded.
은 도움이 될 수 있습니다 - https://github.com/guilhermeblanco/ZendFramework1-Doctrine2/issues/24을 – Phil
이 basicly 문제 예 상태 : D를. 난 그냥 지금은 일부 기본 lib와 함께 2.0 교리를 사용하여 일부를 발견하고 그 작품 ..하지만 난 그것이 왜 wen't 단서가 없어 – Bram