This is not specific to any language, it´s just about best practices. I am using JPA/Hibernate (but it could be any other ORM solution) and I would like to know how do you guys deal with this situation: Let´s supose that you have a query returning something that is not represented by any of your domain classes. Do you create a specific class to represent that specific query? Do you return the query in some other kind of object (array, map...) Some other solutions? I would like to know about your experiences and best practices.
P.S. Actually I am creating specific objetcs for specific queries.