I had the same problem with collections and it seems like a bug in Orion.
In some strange way, orion doesn't regard the dependent class in the
collection as the same as the incoming one, in spite that it is the same
type. I tried the getClass() method and it returned the same class name
(dependent_object xx).
What the problem actually is, I don't know. It could be the orion's
implementation of collections.
One solution to the problem is the following:
public void removeOrderLine(OrderLineData orderLineHolder)
{
// By unknowned reasons the collection returns false
// on orderline objects (both OrderLine and OrderLineData).
// Therefore I had to iterate through the whole collection
// and compare the LineNumber. If equals returns true, then remove.
Iterator iter = this.getOrderLines().iterator();
while (iter.hasNext())
{
OrderLine orderLine = (OrderLine) iter.next();
if (orderLineHolder.getLineNumber().equals(orderLine.getLineNumber()))
this.getOrderLines().remove(orderLine);
}
}
Regards, Theis