Author | Message |
---|---|
afetiso
Posts: 84
|
Posted 21:26 Feb 12, 2015 |
I have Stage model with id, name. I have a plan model: with id list of stages and list of runways, list of cells When I create new stage it appears in stage table in db, but it not appears in stages_planes db where i have: stage_id plan_id
|
afetiso
Posts: 84
|
Posted 21:27 Feb 12, 2015 |
It create a new stage with new id, but it doesn't add it to plan Controller @RequestMapping(value = "/addStage.html", method = RequestMethod.GET) |
afetiso
Posts: 84
|
Posted 21:28 Feb 12, 2015 |
DaoImp: @Override |
afetiso
Posts: 84
|
Posted 21:29 Feb 12, 2015 |
JSP
<form:form commandName="stage" method="POST" action="addStage.html"> <table border="1" cellpadding="2" cellspacing="2"> |
afetiso
Posts: 84
|
Posted 21:30 Feb 12, 2015 |
@Entity Date publishedDate; |
afetiso
Posts: 84
|
Posted 21:31 Feb 12, 2015 |
@Entity |
afetiso
Posts: 84
|
Posted 21:32 Feb 12, 2015 |
stages tabel |
cysun
Posts: 2935
|
Posted 15:22 Feb 13, 2015 |
Because Stage-Plan is a bidirectional association, you need to add plan to stage (which you did), but also add stage to plan before you do merge. And next time please don't post a bunch of actual code in the forum. If you do this again not only I'll delete your posts, I'll treat it as facilitate cheating. |
afetiso
Posts: 84
|
Posted 15:54 Feb 13, 2015 |
Sorry, for that wouldn't do again. |