2709 search results for Doctrine

... ); } return $this; } ``` Because this is a ManyToMany relationships, Doctrine will automatically see that some tags are now removed from postTags and it should delete those rows :). Cheers!
weaverryan
weaverryan
Read Full Comment
... this also removes the ability to inject dependencies into your repository (http://jmsyst.com/bundles/JMSDiExtraBundle/master/doctrine). Try the config to see if it helps. I believe this is a bug in JMSDiExtraBundle - a bug ...
weaverryan
weaverryan
Read Full Comment
... proxy class. I don't see that in my config (I tried on this project). So, I have a few questions: A) If you run `./bin/console debug:container doctrine.orm.default_entity_manager`, what is the class? Is it Doctrine\ORM ...
weaverryan
weaverryan
Read Full Comment
... credentials: ``` // Doctrine DBAL $this->register(new DoctrineServiceProvider(), array( 'db.options' => array( 'driver' => 'pdo_mysql', 'host' => 'localhost ...
... \Doctrine\ORM\EntityManager" ["existsStatus":"Symfony\Component\Config\Resource\ClassExistenceResource":private]=> int(0) } ``` I was not able to understand more from here.. or to change it..
Igor Weigel
Igor Weigel
Read Full Comment
... configuration happens in app/config.yml - you can see: ``` doctrine: dbal: driver: pdo_sqlite path: %kernel.root_dir%/app.db ``` So as you can see we use SQLite DB for this course, and after you ...
... auto_generate_proxy_classes: false + Does this configuration under orm désactive cache, by setting "auto_generate_proxy_classes" to "false", any explination about this config ? + Does caching made the app behaving more faster ? 3)Same question about this configuration (any explanation !) doctrine: orm: metadata_cache_driver: apc
... you still will have *User* object which is autocompleted as Genus object, because there's no magic, getGenusScientists() return collection of genusScientists, i.e. users according to the Doctrine mapping for Genus ...
... ( I did not need it here) and didn't set to any values in the constructor, so it was a null value. I guess doctrine 'thought' that because it was null, it had to be deleted. As soon as I sat a default value in the ...
julien moulis
julien moulis
Read Full Comment
Victor, thank you for your reply, I was trying to get an object with only relevant story and photos info. It seems that Doctrine returns some huge objects that are not easy to use (i.e. not well formed JSON or anything ...
Ciprian Cucu
Ciprian Cucu
Read Full Comment
Hey Ciprian, If I understand you right, you have OneToMany relationship between Story and Photo entities. If you use Doctrine ORM - you can't specify specific fields in select(). Actually, you can... but you probably ...
... 'created_at' at row 1 ``` and this: ``` [Doctrine\DBAL\DBALException] An exception occurred while executing 'ALTER ...
Dimitry K
Dimitry K
Read Full Comment
... For adding / removing I would later build an ajax-query, so if user is typing in a part of username doctrine is quering the matching names out of database instead of loading all the huge bunch of data. Thanks Ryan! Regards, Thomas
Thomas L.
Thomas L.
Read Full Comment
... with in your app, a better way is via fixtures - we chat about that as well: https://knpuniversity.com/screencast/symfony-doctrine/fixtures-alice Let me know if that helps! And cheers!
weaverryan
weaverryan
Read Full Comment
... ('ROLE_USER2')); $em = $container->get('doctrine')->getManager(); $em->persist($event); $em->flush(); function encodePassword(User $user, $plainPassword) { $encoder = $this->container->get('security.encoder_factory') ->getEncoder($user); return $encoder->encodePassword($plainPassword, $user->getSalt()); } ...
... You're right, it is related to the showAction, I changed the showAction to /show/{id}—and of course it works. And I've tried creating the doctrine crud with the /event prefix, then again with the / prefix and both times ...
... http://doctrine-orm.readthedocs.org/en/latest/reference/events.html#onflush. As you can see, it *does* have the ability to persist new changes, though you have to do some special stuff. Good luck!
weaverryan
weaverryan
Read Full Comment
... "product_photos" table. But, let's assume that you DO want 5 products (which is totally valid - I am probably just misunderstanding). In that case, you need to create 5 "new Product" objects. Currently, there is only one Product object, so Doctrine inserts the first time through the loop (which it hits `$em->flush() ...
weaverryan
weaverryan
Read Full Comment
Hey Shairyar! I'm not completely sure, but I believe the issue is that Postgres (being a pretty smart database) has a special JSON field type - see details here: http://stackoverflow.com/questions/29539370/doctrine ...
weaverryan
weaverryan
Read Full Comment
... } This would be the right thing, but in my controller I have a query with join that pulls me all the data from both tables. How do I do this with a single query? It's possible? I have also tried to use fetch EAGER of doctrine, but still performing 2 query.. Any ideas? Thank you very much
JuanLuisGarciaBorrego
JuanLuisGarciaBorrego
Read Full Comment