当前位置: 首页 > 工具软件 > ef-orm > 使用案例 >

EF-ORM查询条件or写在框架中

尉迟雅昶
2023-12-01
Query<WmsInoutTransportWD> transportWD = QB.create(WmsInoutTransportWD.class);

Condition numcond =QB.or(
	QB.ne(WmsInoutTransportWD.Field.num, ""),
	QB.ne(WmsInoutTransportWD.Field.numweight, "")
);
transportWD.addCondition(numcond);
//或者
transportWD.addCondition(QB.or(
	QB.ne(WmsInoutTransportWD.Field.num, ""),
	QB.ne(WmsInoutTransportWD.Field.numweight, "")
));

//此时的transportWD 相当于:
//WmsInoutTransportWD transportWD = new WmsInoutTransportWD ();
//transportWD.getQuary();

 

 类似资料: