Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0BETA2
    • Component/s: None
    • Labels:
      None

      Description

      Not sure if it is ODM issue or some PHP Reflection issue, or I just don't getting something, but following test case won't save the file:

      /** @Document(db="tests", collection="files") */
      class file
      {
          /** @Id */
          protected $id;
      
          /**
           * @File
           * @var \MongoGridFSFile
           */
          protected $file;
      
          function __construct($file) {$this->file = $file;}
      }
      
      $f = new file(__DIR__  . '/test.txt');
      $dm->persist($f);
      $dm->flush();
      

      The problem is in annotation @var \MongoGridFSFile. Without it file is saved properly. Also, if I remove "\" in front of MongoGridFSFile, file will be also saved properly. Weird thing.

        Activity

        Hide
        Jonathan H. Wage added a comment -

        I think this is a problem with the annotations parser and nothing with the ODM.

        Show
        Jonathan H. Wage added a comment - I think this is a problem with the annotations parser and nothing with the ODM.
        Hide
        Jonathan H. Wage added a comment -

        This was an issue with Doctrine Common. I committed a fix for it.

        Show
        Jonathan H. Wage added a comment - This was an issue with Doctrine Common. I committed a fix for it.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: