I want to use h2 as In memory Data base using with Spring. I have tried using it with H2 data base as my local database and it wotks fine, my requirement is that my Unit test should not connect to the local h2 it shoudl connect to in memory data base and the tables that I have created on my Local h2 shoudl be there in memory ( along with some sample Data)
How I can do it I see that I will have to change my url setting as follows - driverClassName=org.h2.Driver url=jdbc:h2:mem:test_mem ( the url I was uing before was url=jdbc:h2:~/test ) Now how do I create this test_mem ? so that my Junit can find the tables. becoz now when I run my Junit I see errors like - WARN : JDBCExceptionReporter - SQL Error: 42102, SQLState: 42S02 ERROR: JDBCExceptionReporter - Table CUSTOMER not found; SQL statement: and that I understand becoz there is no table CUSTOMER ( nor data ) . I wana knwo how can I do it ?' if some one have a sample code or step by step documentaion , will be very helpfull I am new to spring as well hibernate and H2., please if some one can help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
