title: Android - Green Dao Multiple Transaction
body: <p>I have some problem for multiple transaction in greendao 
  example i already have two table with name book and type_book.</p>
  
  <p>i already have code like this :</p>
  
  <pre><code>    SQLiteDatabase db = bookMasterDao.getDatabase();
      db.beginTransaction();
  
      try {
          bookMasterDao.insert(bookMaster);
          idBook = bookMaster.getId().intValue();
          db.setTransactionSuccessful();
      } catch (Exception ex) {
          System.out.println("Error insert book master " + ex);
      } finally {
          db.endTransaction();
      }
  
  
  
      SQLiteDatabase dbTypeBook = typeBookMasterDao.getDatabase();
      dbTypeBook.beginTransaction();
  
      try {
          typeBookMasterDao.insert(bookMaster);
          dbTypeBook.setTransactionSuccessful();
      } catch (Exception ex) {
          System.out.println("Error insert type book" + ex);
      } finally {
          dbTypeBook.endTransaction();
      }
  </code></pre>
  
  <p>I want if transaction type book failure insert , transaction book master rollback i mean cancel insert data book master. How to make transaction like that?</p>
  
  <p>any idea, reference and example very help thank you.</p>