}
    public void setNodeValue (Node value) {	value.checkWriteLock ();	if (type == NODE)	    unregisterNode ();	if (type == JAVAOBJECT)	    this.jvalue = null;	registerNode (value);		type = NODE;	if (node.dbmap != null) {	    Relation rel = node.dbmap.getPropertyRelation (propname);	    if (rel != null && rel.other != null) {	        DbMapping vmap = value.getDbMapping ();	        // check if actual type matches expected type	        if (rel.other != vmap)	            throw new RuntimeException ("Can't assign property: expected prototype "+rel.other+", got "+vmap);	        // check if this is a forward relation, i.e. if we point to a field in the value object	        // if so, we may use something else than the object's id to refer to it.	        if (!rel.virtual && rel.direction == Relation.FORWARD) {	            if (rel.remoteField == null  || vmap.getIDField().equals (rel.remoteField)) {	                this.nvalueID = value.getID ();	            } else try {	                this.nvalueID = value.getString (vmap.columnNameToProperty (rel.remoteField).propname, false);	            } catch (Exception x) {	                throw new RuntimeException ("Can't set "+propname+" to "+value+": error retrieving target property");	            }	            this.dbm = null;	            dirty = true;	            return;	        }	    }	}	this.nvalueID = value == null ? null : value.getID ();	this.dbm = value == null ? null : value.getDbMapping ();	dirty = true;    }