मुझे ज़िन्द एमवीसी का उपयोग करने के लिए विचित्र 2.1 और 2.2 के साथ बिस्ना ड्राइवर के साथ एक साथ बाध्य किया जाता है।बिस्ना सिद्धांत 2.1 और 2.2 एनोटेशन "@टेबल" कभी आयात नहीं किया गया था
नई परियोजना मैं एनोटेशन ड्राइवर का उपयोग कर रहा सिर्फ conveniance के लिए के लिए (i thout) .कैसे कभी मैं डेटाबेस से मेरी इकाई के उत्पन्न कर ली और उन्हें लोड tryed लेकिन वे त्रुटि पैदा रखें:
[Semantical Error] The annotation "@Table" in class MyWheels\Entity\Bmulog was never imported.
मैंने उन्हें ORM \ prefix जोड़ने का प्रयास किया लेकिन यह हल नहीं करता है।
मेरी कॉन्फ़िग फ़ाइल पढ़ने की:
[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
यह मूल रूप से कहा गया है समस्या हाँ: डी। अब मैं कुछ डिफ़ॉल्ट lib के साथ एक 2.0 सिद्धांत का उपयोग कर रहा हूं, मुझे कुछ और कहां मिल गया है .. लेकिन मुझे कोई संकेत नहीं है कि यह गलत क्यों नहीं हुआ – Bram