I have a pretty standard Orders table and an associated OrderRows table, say:
Orders
[id] INTEGER
[name] ...
OrderRows
[orderId] INTEGER
[quantity] INTEGER
[unitPrice] SMALLMONEY
[description] VARCHAR(...)
For some situations I would like to retrieve a list of Orders together with a summary of totals, most of the time I don't care for the summary.
Using the Criteria API I can create a projection of [quantity]*[unitPrice] for each Order but how do I get both the Order and the projection in the same result set?