changed to ->query from ->createQuery