2 Replies Latest reply on Jun 26, 2002 10:48 PM by Lance Cranford

    JDBCRemoveEntityCommand call missing

    Lance Cranford Newbie

      Here's the code I have that's in question.



      public void removeAllLineItems()
      {
      Collection lineItems = getLineItems(); //CMR field

      for(Iterator iter = lineItems.iterator();iter.hasNext();)
      {
      LineItemLocal lineItem = (LineItemLocal)iter.next();

      iter.remove();
      }
      }



      Again, upon inspection of the database, the relationship records are deleted, but the actual Entity table (tb_LineItems) are not. Here's the item I found in the logs

      2002-06-25 20:15:53,694 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCDeleteRelationsCommand.Order] Executing SQL: DELETE FROM TB_ORDER_LINEITEMS WHERE (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?) OR (line_item_id=? AND order_id=?)
      2002-06-25 20:15:53,704 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCDeleteRelationsCommand.Order] Rows affected = 10

      There seems to be a missing call to the JDBCRemoveEntityCommand class for the LineItem Entity in jboss. I was told that a call iter.remove() would do this. Is this a bug?

      If you're seeing this as a double post, please ignore and forgive, as I didn't see the original post in the list