>> Doctrine Error with MySQL Keywords

I recently came across what I would consider a bug, for Doctrine2. Basically, I had created an entity in Symfony2 that I needed to have a boolean that told me if this entry could be shown publicly or not. Without thinking I went ahead and put it down as $show. Since I had set the column name in the annotations, it was automatically taken as the actual field name in the database, when I used doctrine to update the schema. It worked fine, and upon checking the database it all looked correct. I moved on to the code in charge

Posted At: November 27, 2013 Comments: 0 Categories: Doctrine2, PHP, Symfony2 Tags: , , ,

>> ‘Symfony\Component\Form\Form’ was not found

An issue I’ve come across a couple of times recently, by making a small mistake, is persisting a form input to Doctrine using Symfony2. The issue I was having, was that when calling the persist method of the Entity Manager, I was passing it the form instead of the entity. I came across it due to the controller I was working on being quite odd, but it’s very easy to just type the wrong name as lots of people use very similar names for their form and the entity it relates to, for obvious reasons. The key here is to

Posted At: November 27, 2013 Comments: 0 Categories: Doctrine2, PHP, Symfony2 Tags: , , , ,