1. Hibernate Criteria API: count and group by with result in Map stackoverflow.comThe
If we have 3 red cars and 2 blue cars in ... |
2. Group by discriminator value in table per class hierarchy mapping stackoverflow.comIs it possible to write a HQL query that groups results by the discriminator value of a table per class hierarchy mapping? For instance
|
3. Hibernate key mapping for GROUP BY coderanch.com |
4. How to map or assign the result of a group by to a property? forum.hibernate.orgDomain Object: class Project { private int numberOfWorkers; private String name; } class Worker { private Project project; } The usual mapping is done in hbm.xml's. I am running the following query: SELECT project, COUNT(worker) FROM Worker worker GROUP BY worker.project; I want to assign COUNT(worker) to Project.numberOfWorkers through mapping, the query itself or some other mechanism preferably not looping through ... |
5. How to use GROUP BY in query against map collections ? forum.hibernate.orgNewbie Joined: Thu Dec 09, 2004 9:03 am Posts: 2 Location: Glasgow, United Kingdom Hi, I'm trying to execute query that performs a count(*) on the elements of map attached to a parent object and I'm stuck with not knowing how to write the HQL. The objects involved look like: ContentDescriptor Quote: .id .url .project |