Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-411

Bug in PHPDriver and INHERITANCE_TYPE_JOINED

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA4
    • Fix Version/s: 2.0-BETA1
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None

      Description

      This schema works with xml and yaml drivers, but i get this error with php driver.
      All three schemas files was generated from annotation files.
      I think, driver reads the inherite table (inventoryUsbGeneric) before the main table (privateBasicHost) and ignores INHERITANCE

      user@ubuntu-desktop:/var/www/shelly/bin$ ./gen_db_schema.sh 
      PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Property id does not exist' 
      in /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadata.php:150
      
      Stack trace:
      #0 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadata.php(150): ReflectionClass->getProperty('id')
      #1 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadataInfo.php(1184): Doctrine\ORM\Mapping\ClassMetadata->_validateAndCompleteFieldMapping(Array)
      #2 /var/www/shelly/application/doctrine/scripts/inventoryUsbGeneric.php(21): Doctrine\ORM\Mapping\ClassMetadataInfo->mapField(Array)
      #3 /var/www/shelly/library/Doctrine/ORM/Mapping/Driver/PhpDriver.php(124): require_once('/var/www/shelly...')
      #4 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadataFactory.php(250): 
      Doctrine\ORM\Mapping\Driver\PhpDriver->loadMetadataForClass('inventoryUsbGen...', 
      Object(Doctrine\ORM\Mapping\ClassMetadata))
      #5 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadataFactory.php(159): Doctrine\ORM\Mapping\ClassMetadataFactory
      ->_loadMetadata('inventoryUsbG in /var/www/shelly/library/Doctrine/ORM/Mapping/MappingException.php on line 122
      
      Fatal error: Uncaught exception 'ReflectionException' with message 'Property id does not exist' in 
      /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadata.php:150
      Stack trace:
      #0 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadata.php(150): ReflectionClass->getProperty('id')
      #1 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadataInfo.php(1184): Doctrine\ORM\Mapping\ClassMetadata->_validateAndCompleteFieldMapping(Array)
      #2 /var/www/shelly/application/doctrine/scripts/inventoryUsbGeneric.php(21): Doctrine\ORM\Mapping\ClassMetadataInfo->mapField(Array)
      #3 /var/www/shelly/library/Doctrine/ORM/Mapping/Driver/PhpDriver.php(124): require_once('/var/www/shelly...')
      #4 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadataFactory.php(250): 
      Doctrine\ORM\Mapping\Driver\PhpDriver->loadMetadataForClass('inventoryUsbGen...', Object(Doctrine\ORM\Mapping\ClassMetadata))
      #5 /var/www/shelly/library/Doctrine/ORM/Mapping/ClassMetadataFactory.php(159): 
      Doctrine\ORM\Mapping\ClassMetadataFactory->_loadMetadata('inventoryUsbG in 
      /var/www/shelly/library/Doctrine/ORM/Mapping/MappingException.php on line 122
      

      I attached to this issue the annotations files and the php schemas

      1. inventoryUsbGeneric.php
        1 kB
        Uvarov Michael
      2. inventoryUsbGeneric.php
        0.9 kB
        Uvarov Michael
      3. privateInventoryBasic.php
        9 kB
        Uvarov Michael
      4. privateInventoryBasic.php
        5 kB
        Uvarov Michael

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Uvarov Michael
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: