php - Proxies object instead of Entity in Doctrine -


i'm using doctrine , symfony , faced 1 problem. instead of appbundle\entity\item got `proxies__cg__\appbundle\entity\item. data = null.

$test = $em->getrepository(entity\item::class)->find(159); var_dump($test); exit; 

what should change?

object(proxies\__cg__\appbundle\entity\item)[5348]   public '__initializer__' =>      object(closure)[5237]   public '__cloner__' =>      object(closure)[5802]   public '__isinitialized__' => boolean false   private 'id' (appbundle\entity\item) => int 159   private 'name' (appbundle\entity\item) => null   private 'slug' (appbundle\entity\item) => null   private 'description' (appbundle\entity\item) => null   private 'price' (appbundle\entity\item) => null   private 'isfixedprice' (appbundle\entity\item) => null   private 'isexchangable' (appbundle\entity\item) => null   private 'isdeliverable' (appbundle\entity\item) => null   private 'totalviewscount' (appbundle\entity\item) => null   private 'condition' (appbundle\entity\item) => null   private 'soldat' (appbundle\entity\item) => null   private 'category' (appbundle\entity\item) => null   private 'user' (appbundle\entity\item) => null   private 'attributes' (appbundle\entity\item) => null   private 'pics' (appbundle\entity\item) => null   protected 'createdat' => null   protected 'updatedat' => null   protected 'deletedat' => null 

i have $test->getitem()->getslug(). in database item id exists.

i found solution. previous dev used @gedmo\softdeleteable(fieldname="deletedat", timeaware=true) rows have deleted_at value in database. that's way didn't return data.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -