This content has been marked as final.
Show 2 replies
-
1. Re: Accessing collections from queries
jim.barrows Aug 3, 2007 5:40 PM (in response to alexg79)If you look at the JPQL you'll find your answer, which is why you haven't gotten an answer. However, I'll give it to you:
select sum( d.amount) from Delivery d[/code/ This will return the sum of the amount field for every Delivery.
-
2. Re: Accessing collections from queries
alexg79 Aug 4, 2007 5:53 AM (in response to alexg79)And if I only want a sum of deliveries before a certain date? Referring to the map key has been the crux of the problem!