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

ClassMetadata shouldn't store defaultDb value

    Details

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

      Description

      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.

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: