Erik,
I have just come across an example of how to build a hand-built subquery
into an existing criteria. Perhaps one can also try to build the subquery
by using another criteria and use its toString()-Method or some more
sophisticated methods...
Criteria criteria = new Criteria();
...
criteria.add(StatistikEintragPeer.PERSON_ID, person.getId());
criteria.add(StatistikEintragPeer.STATISTIK_EINTRAG_ID,
(Object)(StatistikEintragPeer.STATISTIK_EINTRAG_ID+" IN (SELECT
MAX("+StatistikEintragPeer.STATISTIK_EINTRAG_ID+") FROM
"+StatistikEintragPeer.TABLE_NAME+" GROUP BY
"+StatistikEintragPeer.PERSON_ID+")"), Criteria.CUSTOM);
List result = StatistikEintragPeer.doSelect(criteria, connection);
Regards,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]