title: Data persist in database but can't access them only if restarted the server
body: <p>when doing <code>userFacade.create(user)</code> , i can see the user is created in the database , but i can't login with that user until i restart the application
  or if i unvalidate that session (it is in sessionScoped)</p>
  <p>other exemple :if i create a Cv and add it to user CVs , i can't get the last cv created with <code>user.getListCvs()</code> even if it is in the database ,but if i restart the server i can see it</p>
  <p>this is the bean of creating a CV of the current user</p>
  <pre><code>public class CreerCV implements Serializable{
    @EJB 
    private CvFacade cvFacade;
    @EJB 
    CandidatFacade candidatFacade;
    private Cv cv;
    private Candidat candidat;
  
    @PostConstruct
    public void init(){
      
      cv=new Cv();
   
      HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
      candidat=(Candidat)session.getAttribute(&quot;membre&quot;);
      candidat=candidatFacade.find(candidat.getId()); //so i can not get the listCVs of the my saved attribute in my session , but the listCVs of a user in the database ! This is the problem
  }
  //+getters and setters
  
  public String creerCV(){
      if(candidat!=null){
          cv.setCandidat(candidat);
          candidat.getListeCv().add(cv);
          try{
              cvFacade.create(cv);
              FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(&quot;Création du cv avec succés&quot;));
          }catch(Exception e) {
              System.out.println(e);
          }
      }
      else
      FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, &quot;Une erreur s'est produite&quot;,&quot;&quot;));
  return &quot;/index.xhtml&quot;;
  }
  </code></pre>
  <p>and this is the bean of displaying the CVs of the current user</p>
  <pre><code>@Named
  @RequestScoped
  public class ListeCvs implements Serializable{
  @EJB
  private CvFacade cvFacade;
  
  private List&lt;Cv&gt; listeCvs=new ArrayList&lt;&gt;();
  private Cv selectedCv;
  private Candidat candidat;
  
  
  @PostConstruct
  public void init(){
      
      HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
      candidat=(Candidat)session.getAttribute(&quot;membre&quot;); 
      System.out.println(candidat.getListeCv());
      if(candidat!=null)
      listeCvs=candidat.getListeCv();
      candidat=candidatFacade.find(candidat.getId());
  }
  //getters+setters ect..
  </code></pre>
  <p><strong>Exemple :</strong></p>
  <p>i create a cv , i refresh i can not see the cv created in the table!
  i go to the database , i can see it is created
  i restart my application , i go to my table i can see my cv in the table</p>
  <p>i create a second cv , i can not see it in the table , but i can see the previous one that i created,i see that it is created on the database,i restart my application go to my table i can see my 2 CVs there !</p>
  <p><strong>PS</strong>:for tests, i use <code>System.out.print</code> and some <code>dataTables</code> to see the list</p>