n.makeChildrenPersistable();
    private void makeChildrenPersistable() {        for (Enumeration e = getSubnodes(); e.hasMoreElements();) {            Node n = (Node) e.nextElement();            if (n.state == TRANSIENT) {                n.makePersistable();            }        }        for (Enumeration e = properties(); e.hasMoreElements();) {            String propname = (String) e.nextElement();            IProperty next = get(propname);            if ((next != null) && (next.getType() == IProperty.NODE)) {                // check if this property actually needs to be persisted.                Node n = (Node) next.getNodeValue();                if (n == null) {                    continue;                }                if (dbmap != null) {                    Relation rel = dbmap.getExactPropertyRelation(next.getName());                    if (rel != null && rel.isVirtual() && !rel.needsPersistence()) {                        // make this a virtual node. what we do is basically to                        // replay the things done in the constructor for virtual nodes.                        // NOTE: setting the primaryKey may not be necessary since this                        // isn't managed by the nodemanager but rather an actual property of                        // its parent node.                        n.setState(VIRTUAL);                        n.primaryKey = new SyntheticKey(getKey(), propname);                        n.id = propname;                        n.makeChildrenPersistable();                        continue;                    }                }                n.makePersistable();            }        }    }