I am working on a grails project and trying to use H2 in-memory database to temporarily save the data coming from the user input. I have added this code: url = "jdbc:h2:memory"
in my datasource to set up my database. I created Domain Class that contains two properties. By running the dbconsole
in my browser, I am able to browse the database I have created, and the table (which corresponds to the class name). I am using the ClassName.save(flush:true)
to save the data in the in-memory database, but this throws an error, 'No property "database property name" of "class name" is found'
, and when I check the database in the console, nothing is saved.
Am I missing something? Please help.