PersistentObject po = (PersistentObject) value; delete(po.getOID());
cascadeDelete(oid, (PersistentObject) value);
    public void remove(final OID oid, Property prop, final Object value) {        if (LOG.isDebugEnabled()) {            trace("remove", new Object[] {oid, prop.getName(), value});        }        prop.dispatch(new Property.Switch() {                public void onRole(Role role) {                    addEvent(new RemoveEvent(Session.this, oid, role, value));                    if (role.isComponent()) {                        PersistentObject po = (PersistentObject) value;                        delete(po.getOID());                    } else if (role.isReversable()) {                        PersistentObject po = (PersistentObject) value;                        Role rev = role.getReverse();                        PersistentObject me = retrieve(oid);                        if (rev.isCollection()) {                            addEvent(new RemoveEvent                                (Session.this, po.getOID(), rev, me));                        } else {                            addEvent(new SetEvent                                (Session.this, po.getOID(), rev, null));                        }                    }                }                public void onAlias(Alias alias) {                    remove(oid, alias.getTarget(), value);                }                public void onLink(Link link) {                    throw new Error("not implemented");                }            });        if (LOG.isDebugEnabled()) {            untrace("remove");        }    }