1

I'm using Symfony3 and DoctrineMongoDBBundle. When I try to generate the mongodb schema I get the next Notice and, although I have the collections created, the indexes does not exists.

$ bin/console doctrine:mongodb:schema:create
Created dbs for all classes
Created collections for all classes
Notice: Array to string conversion

This is my yml configuration for the collection

AppBundle\Document\MyDocument:
  type: document
  db: dbName
  collection: collectionName
  fields:
    id:
      type: id
      id:  true
      strategy: AUTO
    productId:
      type: string
    date:
      type: date
  embedMany:
    prices:
      targetDocument: ProductPrice
  indexes:
    ixDate:
      keys:
        date:
          order: asc
    uqProductIdDate:
      keys:
        productId:
          order: asc
        date:
          order: asc
      options:
        unique: true

I'm using the indexes configuration according with Doctrine MongoDB ODM documentation (http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/indexes.html)

Any ideas?

0 Answers0