I have the following reference in my class:
/**
* @Expose
* @Groups({"personal"})
*
* @MongoDB\ReferenceMany(targetDocument="AppBundle\Document\Correspondence", cascade={"remove"})
*/
protected $archiveCorrespondences;
And I want to save this reference in my database under the name archive_correspondences But whatever I did, doctrine always keeps it under archiveCorrespondences
I use the following:
- php 7
- mongodb 3.2
- symfony 2.8
- doctrine/mongodb-odm : dev-master
- doctrine/mongodb-odm-bundle: dev-master
From the doctrine mongodb documentation I did't find any possibilities, like for @Field annotation
, where you can specify name.
By some reasons I can't rename $archiveCorrespondences
to $archive_correspondences
in code.