title: an algorithm that deletes data in a table instead of the extract
body: <p>I coded an algorithm using the Hibernate framework of course to browse a table and return multiple rows.</p>
  
  <p>However, this algorithm erases the contents of the table then the return of this Query is <strong>null</strong>.</p>
  
  <pre><code>ArrayList&lt;Compte&gt; list = null;
      try {
      Session  session = HibernateUtils.getSession();
      Transaction tx = session.beginTransaction();
      Query q = s.createQuery("from Compte where compte_utilisateuridentifiant = :y");
      q.setString("y", identifiant);
      list = (ArrayList&lt;Compte&gt;) q.list();
      tx.commit();
      } catch (HibernateException e) {
  
      } finally {
  
      }
  
      for (Compte c: list)
          System.out.println("[rib] = " + c.getRib() + "\t" +
                  "[title] = " + c.getLibelle() + "\t" +
                  "[dateC] = " + c.getDateCréation() + "\t");
      return list;
  </code></pre>
  
  <p>Here is the CFG File:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;
  
  &lt;hibernate-configuration&gt;
    &lt;session-factory&gt;
      &lt;!--  Paramètres de connexion à la base de données --&gt;
      &lt;property name="connection.driver_class"&gt;org.postgresql.Driver&lt;/property&gt;
      &lt;property name="connection.url"&gt;jdbc:postgresql://localhost:5432/bh&lt;/property&gt;
      &lt;property name="connection.username"&gt;postgres&lt;/property&gt;
      &lt;property name="connection.password"&gt;esct&lt;/property&gt;
      &lt;property name="dialect"&gt;org.hibernate.dialect.PostgreSQLDialect&lt;/property&gt;
  
      &lt;!-- Comportement pour la conservation des tables --&gt;
      &lt;property name="hbm2ddl.auto"&gt;create&lt;/property&gt;
  
      &lt;!-- Activation : affichage en console, commentées et formatées --&gt;
      &lt;property name="show_sql"&gt;true&lt;/property&gt;
      &lt;property name="hibernate.format_sql"&gt;true&lt;/property&gt;
      &lt;property name="use_sql_comments"&gt;true&lt;/property&gt;
  
      &lt;!-- Fichiers à mapper --&gt;
      &lt;mapping class="tn.bh.jpa.Compte" /&gt;
      &lt;mapping class="tn.bh.jpa.Mouvement_Compte" /&gt;
      &lt;mapping class="tn.bh.jpa.Solde" /&gt;
      &lt;mapping class="tn.bh.jpa.User" /&gt;
      &lt;mapping class="tn.bh.jpa.Virement" /&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>Can someone help me please ?
  Thank you :)</p>