Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOEditingContext.revert()


          }
      } finally {
        if( shouldRevert ) {
          ec.lock();
          try {
            ec.revert();
          } finally {
            ec.unlock();
          }
        }
      }
View Full Code Here


    assertEquals(company, p1.company());
    assertEquals(1, company.employees().count());
    assertEquals(p1, company.employees().objectAtIndex(0));
   
    editingContext.revert();
   
    assertEquals(0, company.employees().count());
  }
}
View Full Code Here

            "The attribute named 'department' in the entity named 'Employee' is not a toMany relationship! Expected an NSArray, but got null.",
            exception.getMessage());
      }

      // Test failure where key is to-one fault
      ec.revert();
      ec.invalidateAllObjects();

      e = (Employee) ec.faultForGlobalID(eGid, ec);
      assertTrue(EOFaultHandler.isFault(e.storedValueForKey(Employee.COMPANY_KEY)));
      try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.