Ok alla voy, pero lo he hecho asi y me da un error
Código:
( ! ) Warning: class_parents() [function.class-parents]: Class categoria does not exist and could not be loaded in C:\xampp\php\PEAR\Doctrine\Common\Persistence\Mapping\RuntimeReflectionService.php on line 40
Call Stack
# Time Memory Function Location
1 0.0004 334896 {main}( ) ..\indice.php:0
2 0.0006 364432 require_once( 'D:\webs\mimascota\indice.php' ) ..\indice.php:5
3 0.0203 2567432 Lanzador::run( ) ..\indice.php:46
4 0.0537 5892488 call_user_func ( ) ..\Lanzador.php:19
5 0.0537 5892488 clientesControlador->prueba( ) ..\Lanzador.php:19
6 0.0538 5892680 Doctrine\ORM\EntityManager->find( ) ..\clientesControlador.php:22
7 0.0539 5894816 Doctrine\ORM\EntityManager->getRepository( ) ..\EntityManager.php:371
8 0.0540 5894872 Doctrine\ORM\EntityManager->getClassMetadata( ) ..\EntityManager.php:613
9 0.0540 5894872 Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor( ) ..\EntityManager.php:269
10 0.0540 5894904 Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata( ) ..\ClassMetadataFactory.php:178
11 0.0540 5895088 Doctrine\ORM\Mapping\ClassMetadataFactory->getParentClasses( ) ..\ClassMetadataFactory.php:254
12 0.0547 5920048 Doctrine\Common\Persistence\Mapping\RuntimeReflectionService->getParentClasses( ) ..\ClassMetadataFactory.php:231
13 0.0547 5920080 class_parents ( ) ..\RuntimeReflectionService.php:40
Class categoria does not exist
Aqui la instancia de mi entity manager, para chequear si alguna propiedad tiene un valor que no deberia:
Código:
object(Doctrine\ORM\EntityManager)[19]
private 'config' =>
object(Doctrine\ORM\Configuration)[7]
protected '_attributes' =>
array
'metadataCacheImpl' =>
object(Doctrine\Common\Cache\ArrayCache)[6]
...
'queryCacheImpl' =>
object(Doctrine\Common\Cache\ArrayCache)[6]
...
'resultCacheImpl' =>
object(Doctrine\Common\Cache\ArrayCache)[6]
...
'proxyDir' => string 'C:\Windows\TEMP' (length=15)
'proxyNamespace' => string 'DoctrineProxies' (length=15)
'autoGenerateProxyClasses' => boolean true
'metadataDriverImpl' =>
object(Doctrine\ORM\Mapping\Driver\AnnotationDriver)[13]
...
'classMetadataFactoryName' => string 'Doctrine\ORM\Mapping\ClassMetadataFactory' (length=41)
private 'conn' =>
object(Doctrine\DBAL\Connection)[16]
protected '_conn' => null
protected '_config' =>
object(Doctrine\ORM\Configuration)[7]
protected '_attributes' =>
array
...
protected '_eventManager' =>
object(Doctrine\Common\EventManager)[14]
private '_listeners' =>
array
...
protected '_expr' =>
object(Doctrine\DBAL\Query\Expression\ExpressionBuilder)[17]
private 'connection' =>
&object(Doctrine\DBAL\Connection)[16]
private '_isConnected' => boolean false
private '_transactionNestingLevel' => int 0
private '_transactionIsolationLevel' => int 2
private '_nestTransactionsWithSavepoints' => null
private '_params' =>
array
'driver' => string 'pdo_mysql' (length=9)
'user' => string 'root' (length=4)
'password' => string 'pass' (length=4)
'dbname' => string 'mimascota' (length=9)
protected '_platform' =>
object(Doctrine\DBAL\Platforms\MySqlPlatform)[18]
protected 'doctrineTypeMapping' => null
protected 'doctrineTypeComments' => null
protected '_eventManager' =>
object(Doctrine\Common\EventManager)[14]
...
protected '_schemaManager' => null
protected '_driver' =>
object(Doctrine\DBAL\Driver\PDOMySql\Driver)[15]
private '_isRollbackOnly' => boolean false
private 'metadataFactory' =>
object(Doctrine\ORM\Mapping\ClassMetadataFactory)[20]
private 'em' =>
&object(Doctrine\ORM\EntityManager)[19]
private 'targetPlatform' => null
private 'driver' => null
private 'evm' => null
private 'cacheDriver' =>
object(Doctrine\Common\Cache\ArrayCache)[6]
private 'data' =>
array
...
private 'namespace' (Doctrine\Common\Cache\CacheProvider) => string 'dc2_9f4a7759cab175745fbf6a53baaf7d9b_' (length=37)
private 'loadedMetadata' =>
array
empty
private 'initialized' => boolean false
private 'reflectionService' => null
private 'repositories' =>
array
empty
private 'unitOfWork' =>
object(Doctrine\ORM\UnitOfWork)[21]
private 'identityMap' =>
array
empty
private 'entityIdentifiers' =>
array
empty
private 'originalEntityData' =>
array
empty
private 'entityChangeSets' =>
array
empty
private 'entityStates' =>
array
empty
private 'scheduledForDirtyCheck' =>
array
empty
private 'entityInsertions' =>
array
empty
private 'entityUpdates' =>
array
empty
private 'extraUpdates' =>
array
empty
private 'entityDeletions' =>
array
empty
private 'collectionDeletions' =>
array
empty
private 'collectionUpdates' =>
array
empty
private 'visitedCollections' =>
array
empty
private 'em' =>
&object(Doctrine\ORM\EntityManager)[19]
private 'commitOrderCalculator' => null
private 'persisters' =>
array
empty
private 'collectionPersisters' =>
array
empty
private 'evm' =>
object(Doctrine\Common\EventManager)[14]
private '_listeners' =>
array
...
private 'orphanRemovals' =>
array
empty
private 'readOnlyObjects' =>
array
empty
private 'eagerLoadingEntities' =>
array
empty
private 'eventManager' =>
object(Doctrine\Common\EventManager)[14]
private '_listeners' =>
array
empty
private 'hydrators' =>
array
empty
private 'proxyFactory' =>
object(Doctrine\ORM\Proxy\ProxyFactory)[22]
private '_em' =>
&object(Doctrine\ORM\EntityManager)[19]
private '_autoGenerate' => boolean true
private '_proxyNamespace' => string 'DoctrineProxies' (length=15)
private '_proxyDir' => string 'C:\Windows\TEMP' (length=15)
private 'expressionBuilder' => null
private 'closed' => boolean false
private 'filterCollection' => null