title: Deleting all edges to a vertex and the vertex itself
body: <p>I am trying to write a gremlin expression that will, for a given vertex, delete all the edges to and from it, and then delete the vertex itself.</p>
  
  <p>I am using OrientDB 1.3-SNAPSHOT as my graph database.</p>
  
  <p>This is my expression so far:</p>
  
  <pre><code>//The #8:1 just refers to a vertex
  g.v('#8:1').bothE.each{ g.removeEdge(it) }.back(2)
  </code></pre>
  
  <p>I am expecting the above to delete the edges and then back 2, which should print out the node <code>#8:1</code>. However, for some reason, I am getting this error:</p>
  
  <pre><code>Error: java.lang.NullPointerException
  </code></pre>
  
  <p>Why is this happening?</p>
  
  <p>Finally, how do I go about removing the vertex? The docs showed that <code>removeVertex()</code> requires an argument (which is the vertex). How do I pass the vertex from <code>back(2)</code> into <code>removeVertex()</code>?</p>