I have a query like this:
SELECT ap.person_id FROM
(SELECT distinct ac.person_id person_id,ac.user_id
FROM zrm_actor ac WHERE ac.deleted != 1) ap
WHERE person_id IS NOT NULL
GROUP BY person_id HAVING COUNT(*) > 1;
How can I write this query with criteria?
There is no way to create sub-criteria from a sub-select that it's not match an entity.
SELECT distinct ac.person_id person_id,ac.user_id
FROM zrm_actor ac WHERE ac.deleted != 1
The above query don't match with any entity, so there is no way to create sub-criteria from it.