Doctrine ReflectionException property does not exist

后端 未结 4 728
被撕碎了的回忆
被撕碎了的回忆 2021-02-07 03:52

I\'m trying to add Doctrine on top of an existing database. I let Doctrine generate annotated entities and adjusted from there. When I try to load the entity below I get the e

相关标签:
4条回答
  • 2021-02-07 04:18

    For me clearing the PHP APC cache was the solution

    <?php
    apc_clear_cache();
    
    0 讨论(0)
  • 2021-02-07 04:25

    Since I had renamed the autogenerated property from resellerID to reseller (after trying to use it) it turns out I needed to clear the Doctrine cache.

    php vendor/bin/doctrine.php orm:clear-cache:result
    php vendor/bin/doctrine.php orm:clear-cache:query
    php vendor/bin/doctrine.php orm:clear-cache:metadata
    

    Or, if you are using Symfony with Doctrine:

    php bin/console doctrine:cache:clear-result
    php bin/console doctrine:cache:clear-query
    php bin/console doctrine:cache:clear-metadata
    
    0 讨论(0)
  • 2021-02-07 04:26

    Usually on production you want something like this:

    php bin/console doctrine:cache:clear-result --env=prod
    php bin/console doctrine:cache:clear-query --env=prod
    php bin/console doctrine:cache:clear-metadata --env=prod
    
    0 讨论(0)
  • 2021-02-07 04:37

    Anyway, it helped me

    php artisan  doctrine:clear:metadata:cache
    
    0 讨论(0)
提交回复
热议问题