CModelSaveStatus = existControllerModel == ? CModel.save() : CModel.update()Integer ControllerID = CModel.getInt()(ControllerID == ) { System..println(+ controllerBean.getControllerName())} /*Model Mapping 其中 controller_name varchar(100) 数据库类型Mysql*/ activeRecordPlugin.addMapping("admin_controller","controller_name", ControllerModel.class);
Model.save() 或 Model.update() 后使用Model.getInt("id")获得主键会返回空值
项目:JFinal