Guite/MostGenerator — Issue #113: Make use of getOneOrNullResult method
Author: Guite
Created: 2011-10-26 08:38:42+00:00
State: open
Labels: architecture, zclassic

The AbstractQuery of Doctrine 2 does also offer a method named *getOneOrNullResult()*. This should be used for selecting single objects as *getSingleResult()* raises an exception if no object is found. Returning *null* instead allows easier error handling in the calling controller.