I don't think the where attribute can be used in this way. I believe it has to be a static condition.
The filter feature of Hibernate is more close to what you need. In your <set> mapping you can add a filter definition:
Code:
<filter name="langCode" condition=":onlineLang = online_language"/>
Then, filters are enabled/disabled on a Session level:
Code:
session.enableFilter("langCode").setParameter("onlineLang", onlineLangcode);
Read more about this on:
http://www.hibernate.org/hib_docs/v3/re ... lters.html