core/src/main/java/com/orientechnologies/orient/core/sql/executor/UpdateEdgePointersStep.java
private void handleUpdateEdge(ODocument record) {
    Object currentOut = record.field("out");
    Object currentIn = record.field("in");

    Object prevOut = record.getOriginalValue("out");
    Object prevIn = record.getOriginalValue("in");

    // to manage subqueries
    if (currentOut instanceof Collection && ((Collection) currentOut).size() == 1) {
      currentOut = ((Collection) currentOut).iterator().next();
      record.setProperty("out", currentOut);
    }
    if (currentIn instanceof Collection && ((Collection) currentIn).size() == 1) {
      currentIn = ((Collection) currentIn).iterator().next();
      record.setProperty("in", currentIn);
    }

    validateOutInForEdge(record, currentOut, currentIn);

    changeVertexEdgePointer(record, (OIdentifiable) prevIn, (OIdentifiable) currentIn, "in");
    changeVertexEdgePointer(record, (OIdentifiable) prevOut, (OIdentifiable) currentOut, "out");
  }
private void handleUpdateEdge(ODocument record) {
    Object currentOut = record.field("out");
    Object currentIn = record.field("in");

    Object prevOut = record.getOriginalValue("out");
    Object prevIn = record.getOriginalValue("in");

    // to manage subqueries
    if (currentOut instanceof Collection && ((Collection) currentOut).size() == 1) {
      currentOut = ((Collection) currentOut).iterator().next();
      record.setProperty("out", currentOut);
    }
    if (currentIn instanceof Collection && ((Collection) currentIn).size() == 1) {
      currentIn = ((Collection) currentIn).iterator().next();
      record.setProperty("in", currentIn);
    }

    validateOutInForEdge(record, currentOut, currentIn);

    changeVertexEdgePointer(record, (OIdentifiable) prevIn, (OIdentifiable) currentIn, "in");
    changeVertexEdgePointer(record, (OIdentifiable) prevOut, (OIdentifiable) currentOut, "out");
  }
private void handleUpdateEdge ( ODocument record ) { Object currentOut = record . field ( "out" ) ; Object currentIn = record . field ( "in" ) ; Object prevOut = record . getOriginalValue ( "out" ) ; Object prevIn = record . getOriginalValue ( "in" ) ; // to manage subqueries if ( currentOut instanceof Collection && ( ( Collection ) currentOut ) . size ( ) == 1 ) { currentOut = ( ( Collection ) currentOut ) . iterator ( ) . next ( ) ; record . setProperty ( "out" , currentOut ) ; } if ( currentIn instanceof Collection && ( ( Collection ) currentIn ) . size ( ) == 1 ) { currentIn = ( ( Collection ) currentIn ) . iterator ( ) . next ( ) ; record . setProperty ( "in" , currentIn ) ; } validateOutInForEdge ( record , currentOut , currentIn ) ; changeVertexEdgePointer ( record , ( OIdentifiable ) prevIn , ( OIdentifiable ) currentIn , "in" ) ; changeVertexEdgePointer ( record , ( OIdentifiable ) prevOut , ( OIdentifiable ) currentOut , "out" ) ; }
handles vertex consistency after an UPDATE EDGE

@param record the edge record
handles vertex consistency after an UPDATE EDGE