Uploaded image for project: 'Doctrine MongoDB ODM'
  1. Doctrine MongoDB ODM
  2. MODM-124

ClassMetadata shouldn't store defaultDb value


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


      Currently if document doesn't have "db" mapping, it is taken from defaultDb configuration and assigned to classmetadata (in ClassMetadataFactory).

      But if we have two documentManagers with different defaultDb configuration, second manager's configuration will be ignored, because "db" value is already set in classMetadata (when the 1st manager was created).

      It gets worse with metadata caching, as defaultDb setting is only taken in account when metadata is stored in cache.

      This affects a common use-case, when each customer has his own database and defaultDb is defined at runtime.


        vladar Vladimir Razuvaev created issue -
        jwage Jonathan H. Wage made changes -
        Field Original Value New Value
        Affects Version/s 1.0.0BETA2 [ 10092 ]
        Fix Version/s 1.0.0BETA3 [ 10124 ]
        jwage Jonathan H. Wage added a comment -
        jwage Jonathan H. Wage added a comment - Hi, this is fixed here https://github.com/doctrine/mongodb-odm/commit/6b91d944e68bbf94702a38351f03c74b7d6a057a Thanks for reporting the issue.
        jwage Jonathan H. Wage made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=MODM-124}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


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


            • Created: