2725 search results for Doctrine

... ) [Doctrine\Common\Annotations\AnnotationException] You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1. 2) Script Sensio\Bundle\DistributionBundle\Composer ...
... Hey Ali, It's weird! For Doctrine you need to have pdo_mysql extension - you can check it with "$ php -m | grep pdo". To install it for PHP 7.1 you need to run "sudo apt-get install php7.0-mysql". I suppose "php-mysql ...
... ()->getManager(); $user = $em->getRepository('UserBundle:User')->find($user->getId()); This way we get the complete user object (e.g. including isActive & email address). The entity manager knows about it and persisting the event object finally works. Versions: doctrine/common: v2.4.2 symfony/symfony: v2.5.4
... User object, that it is their User entity. But in a more sophisticated setup, you could make your `User` object just a normal class (not a Doctrine entity), and then create the User object from the JWT as described. This ...
weaverryan
weaverryan
Read Full Comment
... the same object - no matter whether its fields are different or no, because we have exactly the same object, and if some fields were changed, Doctrine will do everything to store those fields in the DB on the next flush(). Cheers!
... would be better reflect said example. I’m still very new to Silex (using the following symfony components: guard/security/doctrine) and am struggling to find a solution to my example. Also I just wanted to point out ...
Binarymayhem
Binarymayhem
Read Full Comment
... after you setting the parent object, you also have to update ArrayCollection on inverse side, i.e. add sub object to the array collection, otherwise inverse side will be updated by Doctrine only on the next page load or ...
... ($product) )); }``` and the getProductId() funtion in the shoppingcart.php: ``` public function getProductId(Product $product) { return $product->getId(); } ``` but then i get this error: Unable to guess how to get a Doctrine instance from the request information for parameter "product". ...
Blueblazer172
Blueblazer172
Read Full Comment
... object is a PersistentCollection, not an RestaurantAddress object like my Entity, so I get an exception: `Call to undefined method Doctrine\ORM\PersistentCollection::getId()`. I'm not using annotations, just yaml ...
Roberto Briones Argüelles
Roberto Briones Argüelles
Read Full Comment
... which database name to use, then, sets the "database_name" parameter to the correct database (assuming you are still using a parameter by that name in your Doctrine configuration inside config.yml). The parameters.php will ...
weaverryan
weaverryan
Read Full Comment
... bummer - there's an issue about it here: https://github.com/doctrine/doctrine2/issues/2918. So, the only way I can think to do this is in the old, inefficient way - e.g. in `getExpertScientists`, loop over all ...
weaverryan
weaverryan
Read Full Comment
... User Provider. So, it's a necessary part of your system, but many people don't even realize it exists or what it does. If you're using Doctrine and your User class is an entity, then you've probably configured the "entity ...
weaverryan
weaverryan
Read Full Comment
... "doctrine"). You can use it to get out whatever entity manager or connection you want, dynamically, based on the client name. I hope this gives you some direction!
weaverryan
weaverryan
Read Full Comment
... \Repository; use \Doctrine\ORM\EntityRepository; class UserRepository extends EntityRepository { public function findByRole($role) { $qb = $this->_em->createQueryBuilder(); $qb->select('u ...
Shairyar Baig
Shairyar Baig
Read Full Comment
Hi Sebastian! Ah, I see your point :). We do cover many of these things in the rest of our Symfony tutorials - http://knpuniversity.com/tracks/symfony - including forms, Doctrine, event dispatcher, validation, logging ...
weaverryan
weaverryan
Read Full Comment
... a bundle will be opinionated and create a service with a very short name for convenience. This is why you have services like `doctrine`, `templating` or `logger`. I hope that explains it a bit! Cheers!
weaverryan
weaverryan
Read Full Comment
... making sure your var/cache directory is writeable. And, you won't be able to use the normal Doctrine migrations system (since you need SSH access to run that command)... but yes, it is possible. But, better that you find a server with SSH! Cheers!
weaverryan
weaverryan
Read Full Comment
Hi Zied, First of all, *you* should always double check the queries inside any new migration, you can't just rely on Doctrine here. So if you see something that could break your production, i.e. potential data loss ...
... object created in "Clone", I would understand why. But this was a brand new query outside the creating function, you'd think doctrine would start the process from scratch).
Terry Caliendo
Terry Caliendo
Read Full Comment
... that you can rename entity's property, i.e. rename column in DB. But if you blindly run doctrine:schema:update - Doctrine will just add a new column and drop existent one, i.e. you will lose your data! Probably, It's not ...