custom repository class in symfony2

后端 未结 6 2055
刺人心
刺人心 2020-12-05 17:40

I\'m new in symfony2.I created a repository class when I created an entity class through command line.But I couldn\'t access my custom functions in that repository class. ho

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 18:09

    xml for mapping: Update xml mapping file in folder Resource/config/doctrine, add repository-class attribute:

    
    

    http://doctrine-mongodb-odm.readthedocs.org/en/latest/cookbook/mapping-classes-to-orm-and-odm.html Then update cache:

    php app/console doctrine:cache:clear-metadata
    php app/console cache:clear
    

提交回复
热议问题