CMS新媒体技术学到的
public List<CmsProgram> searchProgramsByProgramIDs(String ProgramIDs) { // TODO Auto-generated method stub StringBuilder sb = new StringBuilder(); try { sb.append("from CmsProgram as p where p.programID in ("+ProgramIDs+")"); System.out.println("----------------------HelloWorld zzk"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } List<CmsProgram> list = this.getSession().createQuery(sb.toString()).list(); for(CmsProgram program:list){ Hibernate.initialize(program.getCmsPictures()); } return list; }