NutzCN Logo
问答 sql.getList(XX.class)无法取到记录集,SQL语句查询出来是有的???
发布于 2272天前 作者 qq_7fafbecc 1293 次浏览 复制 上一个帖子 下一个帖子
标签:
			String agreeSnoInCnd = "select * from BLOOD_DATA_TICKET_AGREE a where exists (select 1 from ("+existsSql+") x where AGREESNO = a.sno)";
			String forcastSnoInCnd = "select * from BLOOD_DATA_TICKET_FORCAST a where exists (select 1 from ("+existsSql+") x  where FORCASTSNO = a.sno)";
			String detailSnoInCnd = "select * from BLOOD_DATA_TICKET_DETAIL a where exists (select 1 from ("+existsSql+") x where ticketId = a.pid)";
			
			sql = Sqls.create(agreeSnoInCnd);
			sql.setEntity(dao.getEntity(TicketAgree.class));
			dao.execute(sql);
			rvalAgree = sql.getList(TicketAgree.class);
			//---------------------
			sql = Sqls.create(forcastSnoInCnd);
			sql.setEntity(dao.getEntity(TicketForcast.class));
			dao.execute(sql);
			rvalForcast = sql.getList(TicketForcast.class);
			//---------------------
			sql = Sqls.create(detailSnoInCnd);
			sql.setEntity(dao.getEntity(TicketDetail.class));
			dao.execute(sql);
			rvalDetail = sql.getList(TicketDetail.class);

agreeSnoInCnd、forcastSnoInCnd、detailSnoInCnd这3条SQL在数据库中执行,都能查到记录,为何在sql.getList(XX.class)中,查不到记录。
跟断点,显示是null,为什么取不到呢?

4 回复

好像没设定回调。。。

你没设置回调

既然都是查对象,Sqls.queryEntity啦

恩,刚试了,Sqls.queryEntity可以不用设置回调

添加回复
请先登陆
回到顶部