Use ->query instead of ->attributes