Unit Test raises : HsqlException user lacks privilege or object not found: ROWNUM

前端 未结 1 1124
清酒与你
清酒与你 2020-12-20 17:53

I\'ve got an issue with Hibernate when executing my unit tests, here is the issue I get :

org.springframework.dao.InvalidDataAccessResourceUsageException: 
u         


        
相关标签:
1条回答
  • 2020-12-20 18:21

    You are using HSQLDB for unit tests and Oracle in production.

    To run HSQLDB with the Oracle dialect you must first enable Oracle syntax compatibility mode on HSQLDB:

    SET DATABASE SQL SYNTAX ORA TRUE;
    

    The runtime error was most likely produced by a limit imposed on the result size of query. In Oracle this is implemented by using the pseudocolumn ROWNUM. HSQLDB understands ROWNUM only in compatibility mode.

    0 讨论(0)
提交回复
热议问题