Adding doctrine functions to the database class