List list=this.getSession().createSQLQuery("select * from Course c where c.isFinish='true' and c.id not in"
+" (select courseId from  StuCourse sc where sc.stuId = '"+id+"' ) and c.specialtyId in"
+" (select specialtyId from StuUser su where su.id ='"+id+"')").addEntity("c",Course.class).addEntity("sc",StuCourse.class).addEntity("su",StuUser.class).list();
在数据库中可以显示一条记录,可是运行程序时总是报“com.microsoft.sqlserver.jdbc.SQLServerException : 列名 stuId 无效