Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
framework-web:spring:models [2019/02/28 15:56] – [Relations] jcheron | framework-web:spring:models [2019/08/31 14:21] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 86: | Ligne 86: | ||
@ResponseBody | @ResponseBody | ||
public String newOrga(Organization orga) { | public String newOrga(Organization orga) { | ||
- | repo.save(orga); | + | repo.saveAndFlush(orga); |
return orga+" ajoutée."; | return orga+" ajoutée."; | ||
} | } | ||
Ligne 162: | Ligne 162: | ||
@ManyToMany | @ManyToMany | ||
@JoinTable(name = " | @JoinTable(name = " | ||
- | private List<Groupe> groupes; | + | private List<User> users; |
} | } | ||
</ | </ |