fixed createQuery() to work with different connections

see: http://stackoverflow.com/questions/3831513/how-to-do-to-use-different-connections-in-doctrine