This content has been marked as final.
Show 2 replies
-
1. Re: JDBCRemoveEntityCommand call missing
dsundstrom Jun 26, 2002 12:06 AM (in response to lcranford)Sorry, I didn't understand the post you had in the other thread. You actually want to delete all of the line items related to an order. To do that, you get the relation collection, make a copy, and then iterate over the copy and call remove on each related entity. [pre]
public void removeAllLineItems() {
Collection lineItems = new ArrayList(getLineItems());
for(Iterator iter = lineItems.iterator(); iter.hasNext(); ) {
LineItemLocal lineItem = (LineItemLocal)iter.next();
lineItem.remove();
}
} [/pre] -
2. Re: JDBCRemoveEntityCommand call missing
lcranford Jun 26, 2002 10:48 PM (in response to lcranford)Yep. That worked.
Thanks Dain!!