In my application, I have a listing of information that is deducted from a query that combines information from several entities. In itself, a very common situation.
Now, the corresponding repository method should return a list that contains items of an appropriate type. Clearly, choosing an entity is not appropriate because the information we're dealing with spans across multiple entities. I guess the same applies when querying partial entities. Creating a new entity doesn't make sense either because it would only muddle the model.
I was thinking in the direction of something like creating a DTO in the application layer because the particular query really is there to satisfy an application requirement and not a business requirement.
This essentially leads to introducing the notion of application specific repositories and a dependency on the application layer from those specific repositories.
Somehow this doesn't feel right. Is there a more appropriate approach/pattern I could use here?