framework-web:spring:models

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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/08 00:36] – [Relations] jcheronframework-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 150: Ligne 150:
 </sxh> </sxh>
  
 +<sxh java>
 +@Entity
 +public class Groupe{
 + @Id
 + @GeneratedValue(strategy=GenerationType.AUTO)
 + private int id;
 +
 + @ManyToOne
 + private Organization organization;
 +
 + @ManyToMany
 + @JoinTable(name = "user_group")
 + private List<User> users;
 +}
 +</sxh>
  • framework-web/spring/models.1549582572.txt.gz
  • Dernière modification : il y a 6 ans
  • (modification externe)