core/src/main/java/com/orientechnologies/orient/core/command/OBasicCommandContext.java
public OCommandContext setChild(final OCommandContext iContext) {
    if (iContext == null) {
      if (child != null) {
        // REMOVE IT
        child.setParent(null);
        child = null;
      }

    } else if (child != iContext) {
      // ADD IT
      child = iContext;
      iContext.setParent(this);
    }
    return this;
  }
public OCommandContext setChild(final OCommandContext iContext) {
    if (iContext == null) {
      if (child != null) {
        // REMOVE IT
        child.setParent(null);
        child = null;
      }

    } else if (child != iContext) {
      // ADD IT
      child = iContext;
      iContext.setParent(this);
    }
    return this;
  }
public OCommandContext setChild ( final OCommandContext iContext ) { if ( iContext == null ) { if ( child != null ) { // REMOVE IT
 child . setParent ( null ) ; child = null ; } } else if ( child != iContext ) { // ADD IT
 child = iContext ; iContext . setParent ( this ) ; } return this ; }
Set the inherited context avoiding to copy all the values every time.

@return
Set the inherited context avoiding to copy all the values every time .