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

Exception: "The given document has no identity." when findOne query returns none from a MongoGridFs

    Details

      Description

      When running a query against a GridFS that should return no results, I expect the return value to be null (as with normal documents) instead an InvalidArgumentException is thrown, with the message "The given document has no identity".

      It appears the empty result is trying to be registered as a managed document with the UOW, because MongoCollection does not return null in this case.

        Activity

        Hide
        Scott Aubrey added a comment -

        Issue fixed in my git hub branch

        scottaubrey / mongodb-odm @ MODM-59
        git@github.com:scottaubrey/mongodb-odm.git

        pull request sent

        (sorry not sure how much of this I'm meant to mention here, my first contribution with git and github)

        Show
        Scott Aubrey added a comment - Issue fixed in my git hub branch scottaubrey / mongodb-odm @ MODM-59 git@github.com:scottaubrey/mongodb-odm.git pull request sent (sorry not sure how much of this I'm meant to mention here, my first contribution with git and github)
        Show
        Bulat Shakirzyanov added a comment - http://github.com/doctrine/mongodb-odm/commit/e677f64004b9bc900bfc8f098b15eb24dc3d5262

          People

          • Assignee:
            Bulat Shakirzyanov
            Reporter:
            Scott Aubrey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: