3
回答
奇怪的问题,jfinal更新失败
终于搞明白,存储TCO原来是这样算的>>>   

升级后,执行更新功能,报错:

ActiveRecordException: You can't update model without Primary Key.

按照字面的意思,不带主键更新不允许。可是,我看了下,我的程序,是有主键的呀,而且这个表是有主键的

代码如下

HydLoanAdvice hydLoanAdvice = HydLoanAdvice.dao.findById(loan_id);
    hydLoanAdvice.set("credit_time", Util.getFormatDate());
    hydLoanAdvice.set("credit_status", "CREDIT");
    hydLoanAdvice.set("credit_advice", "信贷初审通过");
    hydLoanAdvice.update();

标识的获取的对象内容如下:明明是有ID的呀,而且也是主键,为啥更新失败?

loan.hydloanadvice.model.HydLoanAdvice@2add7e50 {contract_time:2014-11-16 14:43:01.0, call_time:null, contract_status:PASS_CONTRACT, credit_time:2014-11-16 13:53:34.0, tender_status:TENDER, ven_manage_time:2014-11-16 14:17:49.0, financial_advice:同意, call_advice:null, loan_advice:, contract_advice:, accept_advice:tongy, ID:012AD9F2BA6843BB90DEA216B1ACAC35, repayment_status:REP_IN, credit_advice:信贷初审通过, accept_time:2014-11-16 14:00:35.0, flow_user_name:null, flow_user:null, survey_status:PASS_SURVEY, manager_status:PASS_MANAGER, manager_advice:, loan_status:HAS_LOAN, call_status:null, accept_status:PASS_ACCEPT, ven_manage_advice:风控经理初审通过, financial_time:2014-11-16 14:49:11.0, credit_status:CREDIT, financial_status:PASS_FINANCIAL, survey_advice:通过, ven_manage_status:VEN_PASS, survey_time:2014-11-16 14:10:58.0, flow_time:null, audit_time:2014-11-16 14:18:48.0, manager_time:2014-11-16 14:54:01.0, audit_advice:, audit_status:PASS_AUDIT, loan_time:2014-11-16 14:57:03.0}

 

<无标签>
举报
顶部