Sql sql = Sqls.queryRecord(" SELECT * FROM t_treenode WHERE node_id IN (SELECT ishead FROM t_treenode WHERE node_id = @node_id ");
sql.setParam("node_id", node_id);
this.dao.execute(sql);
下面测试了一些,求wendal哥等官方军给解答
Treenode parentNode = sql.getObject(Treenode.class);
List<Record> list = sql.getList(Record.class);
Treenode entity = null;
for (Record r : list) {
entity = r.toEntity(this.dao.getEntity(Treenode.class));
}
List<Treenode> list = sql.getList(Treenode.class);
//System.out.println(list.get(0));