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

Default database when @Document annotation does not contain a db attribute.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Can't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.0.0ALPHA2
    • Component/s: None
    • Labels:
      None

      Description

      When a Document is annotated with @Document(collection="test") and is missing the db attribute the ODM defaults to mongo_dev. What i expected was it defaulted to the database name given when creating a connection.

        Activity

        Hide
        Jonathan H. Wage added a comment -

        We have no way to retrieve the database you connected to so you have to configure it by setting $config->setDefaultDB('db_name');

        Show
        Jonathan H. Wage added a comment - We have no way to retrieve the database you connected to so you have to configure it by setting $config->setDefaultDB('db_name');

          People

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

            Dates

            • Created:
              Updated:
              Resolved: