2 Replies Latest reply on Mar 17, 2006 1:58 PM by Alfonso Tamés

    In a OneToMany relation, invoking clear() on the collection

    Alfonso Tamés Newbie

      I have a OneToMany relation:

      public class Order implements Serializable {
       private List<Product> orderedProducts;
       public List<Product> getOrderedProducts() {
       return products;

      When i do this:
      Order order = manager.find(Order.class, orderid);

      The products are not deleted from the database, instead their field orderid is updated to null !!!

      Is this normal ?


      Alfonso Tamés