title: Adding records in loop to OrientDB via Java API
body: <p>I have the following code:</p>
  
  <pre><code>    // OPEN THE DATABASE
      ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost/test").open("admin", "admin");
  
      // CREATE A NEW DOCUMENT AND FILL IT
      for(int i = 0; i &lt; 10; i++){
      ODocument doc = new ODocument("Foo");
          doc.field( "number", i );
          doc.save();
      }
      db.close();
  </code></pre>
  
  <p>When calling "select * from Foo" the output is:</p>
  
  <p>rid: 17:0 version: 0 class: Foo number: 0</p>
  
  <p>Why is there only one record and not 10 with numbers 0 to 9 ?</p>
  
  <p>What am I doing wrong?</p>