We’re straying from the original question about finding the result of to_attr. Can you open a new thread with your question about querying? When you do, be sure to mention whether a values() query would be sufficient or whether you want model instances.
EDIT: that thread already existed