Hi,
is there a way to use 'distinct' queries ?
At the moment I use it like, but unfortunately this is really hardcoded :( :
Code:
net.sf.hibernate.sql.QuerySelect qs = new net.sf.hibernate.sql.QuerySelect(new
net.sf.hibernate.dialect.OracleDialect());
qs.setDistinct(true);
qs.addSelectColumn("device.deviceName", "");
qs.addSelectColumn("device.deviceDesc", "");
qs.addSelectColumn("user.firstName", "");
String qu = qs.toQueryString() +
" Devic as device, User as user where device.deviceName in ('tel', 'mobile')";
Iterator it = session.iterate(qu);
thanks,
--awt