Using Doctrine I am trying to check if flush()
is successful.
before my ORM days I used to do if ( $query->execute() ) {}
Since flush()
returns void, I am not convinced that using try catch
would solve the problem like suggested here ? Would it ?
If not, is there a way to achieve something similar ?