Hi all, Using Spring / JPA & Hibernate, with my DAOS using the getJPATemplate() method of querying my db I'm stuck designing a particular query..
What I need to do is query to create a list of objects where there is more than one occurance of an element over particular dates.. Ill show you a class structure to describe this..
class A {
String name;
Date theDate;
... lots of other fields
}
so what I need is to create a list containing just the name and theDate fields from object A where the name occurs more than once .. e.g. say this is my table contents:
Name TheDate
dave 1/1/1
dave 2/1/1
john 1/1/1
frank 1/3/1
if that was my data set i'm query against I want my resulting list to contain the two daves... because it occurs on more than one date...
I hope this makes sense.. I'm not sure how to do this kind of query with JPA & Hibernate.. any help appreciated..
thank you