2709 search results for Doctrine

Database Migrations

... Integrity constraint violation: 1048 Column fun_fact cannot be null Here's the deal: Doctrine configures all columns to be required in the database by default. If you do want a column to be "nullable", find the column and ...

4:12
Stripe Customers Our Users

... we need to actually add the new column to our table. Since this project uses Doctrine migrations, open a new tab and run: All that did was create a new file that contains the raw SQL needed to add this new ...

2:55
HATEOAS Loves Routers

... it doesn't! I messed up some syntax. Anytime you see the Doctrine\Common\Annotations T_CLOSE_PARENTHESIS type of thing, this is a syntax error in your annotation. I'm missing a comma between my arguments. Let's try that ...

3:12
Welcome to Symfony

... In this course, we've got some big goals: Start a new project using Symfony2. Explore the core areas, like routing, controllers, requests, responses and templating. Get comfortable with a few extra tools, like Doctrine ...

2:51
Dependency Inject All the Things

... constructor argument and a second class property: // src/Yoda/EventBundle/Reporting/EventReportManager.php // ... use Doctrine\ORM\EntityManager; use Symfony\Component\Routing\Router; class EventReportManager { } This time ...

3:14
Configuration Loading and Type-Hinting

... /Reporting/EventReportManager.php // ... use Doctrine\ORM\EntityManager; class EventReportManager { } If you’re not too comfortable with this, don’t worry. This is optional, but a good practice to get into.

2:01
More with ManyToMany Avoiding Duplicates

... an attendee to the Event. And when Doctrine saves, it tries to add a second row to the join table. Not cool! Adding the hasAttendee Method¶ To fix this, create a new method in Event called hasAttendee. This will return ...

2:51
Composer

... I searched for the doctrine/dbal package and added it. With the require command, you can search for the package you need and Composer will automatically update your composer.json for you and run the update command to ...

14:00
... postpone to write *everything* in Symfony way, i.e. keep hardcoded HTML forms, do not use Doctrine ORM, keep plain queries with PDO, etc. When you finish migrating to Symfony, it would be easier to refactoring these ...
... ------------------------------------------------------------------------------------------ When I executed php bin/console h:d:f:l I've got the following error messages: [Doctrine\DBAL\Exception ...
Paolo Mazzanti
Paolo Mazzanti
Read Full Comment
... ) {... $solicitud->getIdDatofacturacion(); DatoFacturacion object(DatoFacturacion)#199 (10) {... $solicitud->getIdDireccion(); Direccion object(Direccion)#181 (9) {... $solicitud->getServicios(); object(Doctrine\Common ...
sebastian
sebastian
Read Full Comment
... ` (`id`)) [Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException] An ...
... ) In alterRoutes, instead of altering routes, we'll be adding new ones! How? Basically, you'll create a new instance of this class: https://github.com/doctrine/annotations/blob/master/lib/Doctrine/Common/Annotations ...
weaverryan
weaverryan
Read Full Comment
Hi Victor, I ran into a new issue. At my project I manually created a new entity to connect to my old_wtb. My doctrine.yaml is as following: ```yaml doctrine: dbal: default_connection: default ...
Hey @Huy! Hmm. I have a feeling this is being caused by Doctrine. So when deserialization happens, it uses Symfony's property-info component to get the "type" of a property - e.g. `coolFactor` in this case. To get ...
weaverryan
weaverryan
Read Full Comment
Hi! If this is still active, I have a question about setting up multiple connections in Doctrine. We have a system that we're trying to implement where we selectively use a read-only database. Currently, we have it ...
... contains an instance of class B on a property: it does not need to be (and shouldn't be) using a ManyToOne attribute from Doctrine. So, for example: ``` #[ApiResource] class A { public string $name ...
weaverryan
weaverryan
Read Full Comment
Hey Mattias, Hm, well, they are not that much different fairly speaking.. but yeah, it's better to separate them. The more specific version you specify there - less problems you will have, and queries that Doctrine ...
... function in MySQL - it will require you to deal with Doctrine anyway, and Doctrine requires it to be configured someway. Even if it worked - it would complicate things I think. I would recommend you to simply write a ...
... queries here: http://knpuniversity.com/screencast/doctrine-queries/joins Good lucks! This stuff is the hardest part of Doctrine in my opinion: trying to keep your head straight about all the different directions for each ...
weaverryan
weaverryan
Read Full Comment