Doctrine MongoDB ODM
  1. Doctrine MongoDB ODM
  2. MODM-109

Reference with Inheritance: Proxy error: 'document with identifier .. could not be found'

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.0.0BETA2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac osx

      Description

      It's hard to explain this issue,

      I have a single table Inheritance, the base class is Block. ContainerBlock is a child class of Block.
      I have a document Page who have a one-one with ContainerBlock (child of Block). ContainerBlock as many Block.

      • Test script:
        ----------------

      I have created a complete test-case (see attachment).
      phpunit InheritanceReference/InheritanceReferenceTest.php

      • Expected result:
        -----------------------

      no error, no exception.

      • Actual result:
        -------------------

      1) InheritanceReference\InheritanceReferenceTest::testMulipleInheritance
      Doctrine\ODM\MongoDB\MongoDBException: The "Proxy\DocumentBlockProxy" document with identifier "4d3d08116aba269508000001" could not be found.

      src/vendor/symfony/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/MongoDBException.php:69
      src/Bundle/InheritanceReference/Proxy/DocumentBlockProxy.php:25
      src/Bundle/InheritanceReference/Proxy/DocumentBlockProxy.php:34
      src/Bundle/InheritanceReference/InheritanceReferenceTest.php:65

        Activity

        Hide
        Jonathan H. Wage added a comment -

        In your annotations you have @mongodb: but for just a standalone Doctrine test you don't need that. When I corrected the annotations no problem existed.

        Show
        Jonathan H. Wage added a comment - In your annotations you have @mongodb: but for just a standalone Doctrine test you don't need that. When I corrected the annotations no problem existed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: