再使用HQL语句通过封装查询时,会添加一个虚拟的实体类
select new com.musicworld.vo.ComUserSong(c.commentId,c.commentTime,c.content,c.userinfo.userName) from Comment c
再使用HQL语句通过封装查询时,会添加一个虚拟的实体类
select new com.musicworld.vo.ComUserSong(c.commentId,c.commentTime,c.content,c.userinfo.userName) from Comment c