title: Nested transaction on google app engine datastore
body: <p>If I want all deletes execute all-or-nothing. </p>
  
  <ol>
  <li>If nothing changed. Will the group of deletes be atomic?</li>
  <li>If I remove outer transaction, will something change?</li>
  <li>If I remove only inner transaction, will group be atomic?</li>
  <li>Ig I replace for-cycle with a batch delete and leave only outer transaction?</li>
  </ol>
  
  <pre>
  
      // inside event plan dao
      public void delete(EventPlan eventPlan) {
        final Objectify ofy = Objectify.beginTransaction();
        try {
          final ActivityDAO activityDao = new ActivityDAO();
          for (final Activity activity : eventPlan.getActivities()) {
            activityDao.delete(activity);
          }
          ofy.getTxn().commit();
        } finally {
          if (ofy.getTxn().isActive()) {
            ofy.getTxn().rollback();
          |
        }
      }
  
  </pre>    
  
  <pre>   
  
      // inside activity dao
      public void delete(Activity activity) {
            final Objectify ofy = Objectify.beginTransaction();
         try {
            // do some logic in here, delete activity and commit txn
         } finally {
            // check and rollback as normal
         }
      }
  
  </pre>