details:   https://code.openbravo.com/erp/devel/pi/rev/75bb6c439f80
changeset: 16796:75bb6c439f80
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Fri Jun 08 22:05:36 2012 +0200
summary:   Added additional example method

diffstat:

 src-test/org/openbravo/test/dal/DalPerformanceExampleTest.java |  11 ++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r 25ca12e0813e -r 75bb6c439f80 
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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to