2725 search results for Doctrine

... ( 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
Hey Greg! I was just looking for a bit more information, because I'm not convinced I've given you enough to solve this yet (and I'm curious about what's going on). As I said earlier, for some reason, Doctrine is ...
weaverryan
weaverryan
Read Full Comment
... set back on your entity, that is a *full* entity object. You could, in theory, use a partial objects (http://stackoverflow.com/questions/10482085/how-to-fetch-class-instead-of-array-in-doctrine-2#answer-12044461). Or, you ...
weaverryan
weaverryan
Read Full Comment
... Doctrine is trying to convert the SubFamily into a string to save it to the database. This isn't the easiest error to debug, but there it is :). Btw, it wouldn't help here a TON, but if you pass -vvv to any command, you can ...
weaverryan
weaverryan
Read Full Comment
He Weaverryan, So far I love everything! Great courses. keep it up! :) I got a problem with this startup. I copied the new files, dropped, created, and migrated doctrine. Now I wanted to load the fixtures (I copied ...
Daan Hage
Daan Hage
Read Full Comment
Hey Claudio! Ah, you're right - my answer above is a bit too "ahead" - it applies to how your code would look after the Doctrine relations tutorial when we make the notes dynamic! For now, it should look something like ...
weaverryan
weaverryan
Read Full Comment
OK, so speaking in terms, you have many-to-many relationship between Slide and Bank entities. Here's a link about this implementation using Doctrine ORM: https://knpuniversity.com/screencast/symfony2-ep3/many-to-many ...
Hey Dennis, Ha, that's a good question! Actually, it depends... and btw, we use it in other tutorial: https://knpuniversity.com/screencast/symfony2-ep3/doctrine-lifecycle-callback . So, here's a point: use ...
... own thing", which is "frowned upon", but happens all the time. And in that case, I like simple structures, so I just exposed the doctrine relation. I hope that helps! There's still a lot in REST that is subjective. I ...
weaverryan
weaverryan
Read Full Comment