I want to get the duplicate entries. I want to use the query as criteria, for this i am using the below code.
SELECT * from A
WHERE field in (
SELECT field from A
GROUP BY field HAVING COUNT(field) > 1
);
The Hibernate mapping is like
@Entity
class A{
...
private String field;
...
}
How can I get list of A that have duplication in 'field' column?
My own answer according prompted Anthony Accioly