title: JPA Delete query not working
body: <p>Well, I do not understand why me code does not work. Could Someone please take a look. It does not provide any error messages but the Customer will not be deleted. Other methods are working well (getCustomerbyId, getAllCustomers and so)
  Thanks</p>
  
  <pre><code>public void deleteCustomerById(long id) {
          EntityManager em = null;
          try {
              em = JpaUtil.getFactory().createEntityManager();
              em.getTransaction().begin();
              Query query = em.createQuery("Delete  from Customer c where c.id = :id");
              query.setParameter("id", id);
              em.getTransaction().commit();
          } finally {
              JpaUtil.closeQuietly(em);
          }
      }
  </code></pre>