您好需要在 toplink 中使用 NULLS LAST 子句按顺序进行查询。基本上这是我想做的查询:
select * from VW_SEGNA_PRZZ_DEP_INFO where ente_cd = '7316' and refr_cd = '000070434' order by dp_dt_timestamp_modifica DESC NULLS LAST;
这是我的代码:
ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(VwSegnaPrzzDepInfo.class);
Expression exp = new ExpressionBuilder();
exp =
exp.and(new ExpressionBuilder().get("enteCd").equal(getEnteCd()));
exp =
exp.and(new ExpressionBuilder().get("refrCd").equal(spdf.getRefrCd()));
query.setSelectionCriteria(exp);
query.addDescendingOrdering("dpDtTimestampModifica");
我不知道如何插入 NULLS LAST 子句。我使用 toplink 3.0 和 Oracle 9i 作为数据库。