Hello Vishal,
after looking at the cross post have no idea if this can be of any help.. I was browsing some other post and was wondering if this would help you anyways below is my two cents.
Have you tried to define a filter on the mapping file itself? here is the linky:-
http://docs.jboss.org/hibernate/stable/ ... lters.htmlLong story short the article mentions to create a filter in your case on the Table B and enable filter and then execute your HQL query.
THIS MAY NOT DO THE LEFT OUTER JOIN THOU.
<class name="myClass" ...>
...
<filter name="myFilter" condition=":myFilterParam = MY_FILTERED_COLUMN"/>
</class>
enable the filter and then run the query.
Session session = ...;
session.enableFilter("myFilter").setParameter("myFilterParam", 35236);
List results = session.createQuery(<<your HQL>>)
.list();
Hope this helps,
Srilatha.