Hi,
Am working on my first bespoke function post scaffolding. When I go to save a record I get
“ids for this class must be manually assigned before calling save()”
This, and an old forum comment, implies that autoincremente is not being used? If so, I am currious to know why but more importantly would like to understand if my approach right, the options and the pro and cons.
Code is:
@RequestMapping(“/runPanProc.action”)
public ModelAndView runPanProc(@RequestParam Integer procId) {
ModelAndView mav = new ModelAndView();
PanProcedures proc = panProceduresDAO.findPanProceduresByPrimaryKey(procId);
PanProcRuns r = new PanProcRuns();
String m = proc.getProcedureName();
r.setProcRunMemo(proc.getProcedureName().concat(“: Has memo: “).concat(m));
r.setProcRunRunType(“development”);
r.setProcRunProcedureId(procId);
*** fail hereon this next line ****
r = panProcRunsDAO.store(r);
panProcRunsDAO.flush();
mav.addObject(“panprocruns”, r);
mav.setViewName(“panprocruns/viewPanProcRuns.jsp”);
return mav;
}
Regards