Permalink
Browse files

HHH-6682 add support for oracle "bitand" function to Oracle Dialect

  • Loading branch information...
1 parent 9f720b2 commit cb60b0259cf8ef1d3d1f5848ef0316865dfd25bd brmeyer committed Sep 18, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 hibernate-core/src/test/java/org/hibernate/test/math/MathTest.java
View
6 hibernate-core/src/test/java/org/hibernate/test/math/MathTest.java
@@ -53,9 +53,9 @@ public void testBitAnd() {
s = openSession();
s.beginTransaction();
- int value1 = (int)s.createQuery( "select bitand(m.value,0) from MathEntity m where m.id=" + id ).uniqueResult();
- int value2 = (int)s.createQuery( "select bitand(m.value,2) from MathEntity m where m.id=" + id ).uniqueResult();
- int value3 = (int)s.createQuery( "select bitand(m.value,3) from MathEntity m where m.id=" + id ).uniqueResult();
+ int value1 = ((Integer) s.createQuery( "select bitand(m.value,0) from MathEntity m where m.id=" + id ).uniqueResult()).intValue();
+ int value2 = ((Integer) s.createQuery( "select bitand(m.value,2) from MathEntity m where m.id=" + id ).uniqueResult()).intValue();
+ int value3 = ((Integer )s.createQuery( "select bitand(m.value,3) from MathEntity m where m.id=" + id ).uniqueResult()).intValue();
s.getTransaction().commit();
s.close();

0 comments on commit cb60b02

Please sign in to comment.