<?xml version="1.0" encoding="utf-8"?> <doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd"> <!-- This file has been generated by the EasyExtends bundle ( https://sonata-project.org/easy-extends ) References : xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en --> <document name="App\Application\Sonata\MediaBundle\Document\Gallery" > <field fieldName="id" id="true" /> </document> </doctrine-mongo-mapping>