我有一個非常簡單的領域類Grails的H2數據庫中創建表
class Person {
String code
}
而且我也使用缺省數據源配置:
dataSource {
pooled = true
driverClassName = "org.h2.Driver"
username = "sa"
password = ""
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
dialect = "org.hibernate.dialect.H2Dialect"
}
} ...
但是當我打開/ DBCONSOLE然後我看到DB是空着,沒有桌子。爲什麼?我做錯了什麼?