SHARE
TWEET

Untitled

a guest May 19th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. txn = ORMGetSession().beginTransaction();
  2. try {
  3.     User = EntityLoadByPK("User",1);
  4.     User.setName("Bob");
  5.     User.setEmail("NotAValidEmail!");
  6.     if (User.isValid()) {
  7.         txn.commit();
  8.     } else {
  9.         ORMClearSession();
  10.     }
  11. }
  12. catch(any err)  {
  13.     txn.rollback();
  14.     rethrow;
  15. }
RAW Paste Data
Top