Hi, Markus, > Now I managed this with two criteria.addJoin(); > > Is there a better way?
I think treating it as a regular, instead of a nested, query, makes lots of sense (at the SQL level, independent of torque). Just think of the query as select name [or perhaps DISTINCT name] from resource r inner join resource_postalcode_rel k on k.id [or perhaps k.RESOURCE_ID] = r.id inner join postalcode p on p.id = k.postalcode_id where p.city_name like '%76%' or p.postalcode like '%76%' To my eye, anyway, that's a good deal clearer than the nested selects. Peace, --Carl --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
