Added additional example method
authorMartin Taal <martin.taal@openbravo.com>
Fri, 08 Jun 2012 22:05:36 +0200
changeset 16796 75bb6c439f80
parent 16795 25ca12e0813e
child 16797 e1e23b382aa1
Added additional example method
src-test/org/openbravo/test/dal/DalPerformanceExampleTest.java
--- a/src-test/org/openbravo/test/dal/DalPerformanceExampleTest.java	Fri Jun 08 16:09:10 2012 +0200
+++ b/src-test/org/openbravo/test/dal/DalPerformanceExampleTest.java	Fri Jun 08 22:05:36 2012 +0200
@@ -265,4 +265,15 @@
       }
     }
   }
+
+  /**
+   * DML Style operations
+   */
+  public void testDML() {
+    // for example add an a to all categories
+    String hqlVersionedUpdate = "update BusinessPartnerCategory set name = CONCAT(name, 'a') where name <> null";
+    int updatedEntities = OBDal.getInstance().getSession().createQuery(hqlVersionedUpdate)
+        .executeUpdate();
+    System.err.println(updatedEntities);
+  }
 }
\ No newline at end of file