S_sale s = dao().fetch(S_sale.class, Cnd.where("billid", "=", billid));
dao().fetchLinks(s, "^s_sale");
@Table("dbo.s_sale")
@View("dbo.a_s_sale")
public class S_sale {
/**
* 0.业务系统单据类型
*/
private int bkind;
/**
* 83.销售单据明细
*/
@Many(target = S_saledetail.class, field = "billid")
private List<S_saledetail> s_saledetail;
/**
* 83.销售合计
*/
@Many(target = S_salechild.class, field = "billid")
private List<S_salechild> s_salechild;
日志
2017-03-13 07:07:18,437 org.nutz.dao.util.Daos.getColumnIndex(Daos.java:127) INFO - Can not find @Column(lgs_rate) in table/view ()
2017-03-13 07:07:18,475 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - select * from(select row_number()over(order by __tc__)__rn__,* from(select top 1 0 __tc__, * FROM dbo.a_s_sale WHERE billid=?)t)tt where __rn__ > 0 order by __rn__
| 1 |
|----|
| 41 |
For example:> "select * from(select row_number()over(order by __tc__)__rn__,* from(select top 1 0 __tc__, * FROM dbo.a_s_sale WHERE billid=41)t)tt where __rn__ > 0 order by __rn__ "
2017-03-13 07:07:18,504 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dateUtils'<class org.apache.commons.lang.time.DateUtils>