2 Replies Latest reply on Dec 10, 2009 2:35 AM by jaikiran pai

    Weird generated SQL with JBoss 5.1

    Patrick Jusseau Newbie

      Hi,

      I am trying to migrate my ejb3 app from JBoss 4.2.3 to JBoss 5.1
      I get a strange hibernate related issue when trying to perfrom an native query with JBoss 5.1 :

      String nativeQuery = "select sysdate from dual";
      Query query = getEntityManager().createNativeQuery(nativeQuery);


      When I execute this code withing JBoss 5.1 I get the following in the console :

      12:09:22,833 INFO [STDOUT] Hibernate: select * from (select sysdate from dual ) where rownum <= ?

      This used to work perfectly inside JBoss 4.2.3 so I wonder what I need to do ???

      Any ideas?

      - Patrick