那这个sql运行下来符合你要求吗?
看你本身是想要做什么,left join, right join, 还是inner join? ------解决方案-------------------- public List<Object> findElecPopedomByLoginName(final String name) {
final String sql = "SELECT a.Popedomcode FROM elec_role_popedom a " +
" LEFT OUTER JOIN elec_user_role b ON a.RoleID = b.RoleID " +
" INNER JOIN elec_user c ON b.UserID = c.UserID AND c.LoginName = ?";
List<Object> list = (List<Object>) this.getHibernateTemplate().execute(new HibernateCallback(){