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,为什么取不到呢?