graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java
@Override
  public Object getId() {
    if (rawElement == null)
      // CREATE A TEMPORARY ID
      return vOut.getIdentity() + "->" + vIn.getIdentity();

    setCurrentGraphInThreadLocal();

    return super.getId();
  }
@Override
  public Object getId() {
    if (rawElement == null)
      // CREATE A TEMPORARY ID
      return vOut.getIdentity() + "->" + vIn.getIdentity();

    setCurrentGraphInThreadLocal();

    return super.getId();
  }
Returns the Edge Id assuring to save it if it's transient yet.