Trying to add doctrine support. Still to-do