And it will work great when you first start writing blog posts. But as the total number of posts increases, the performance will get worse and worse. That’s because, apparently, when you ask Doctrine to “fetch one” that doesn’t quite convert to LIMIT 1 on the back end. It will actually select — and possibly instantiate an object for — everything that matches your query. After it’s done with all this work, Doctrine will hand you the first result.

If you want to save yourself headaches later, use something like this: