Warning: spl_object_hash() expects parameter 1 to be object
问题 Warning: spl_object_hash() expects parameter 1 to be object, string given in /var/www/sitetwo/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 1367 I created MainBlogBundle with Category.php and Product.php using yml mapping annotation via php app/console commands. After using CRUD actions for add/edit/delete/show actions I tried to add a category and after submitting Add category form I get the Warning: spl_object_hash() expects parameter 1 to be object, string given in /var/www