我正在尝试将一个新的 Grails 项目链接到一个预先存在的 SQL Server 2008 数据库,问题是当我尝试列出/更新或没有任何工作时,我得到一个错误读取
未找到表“TEST_EXEC_QUEUE”;SQL语句:选择前10个this_.id为id0_0_,this_.Env为Env0_0_,this_.Priority为Priority0_0_,this_.State为State0_0_,this_.subSystem为subSystem0_0_,this_.system为system0_0_,this_.test_scenario_id为test7_0_0_ from test_exec_queue this_ [42102-164]
我的 datasource.groovy 文件是:-
dataSource {
pooled = false
driverClassName = "net.sourceforge.jtds.jdbc.Driver"
dialect = "org.hibernate.dialect.SQLServerDialect"
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
// environment specific settings
development {
dataSource {
dbCreate = "update"
url = "jdbc:jtds:sqlserver://UKSQL08;databaseName=Selenium"
}
}
域文件如下,有人有什么想法吗...?
package testexecqueue
class TestExecQueueCheck {
static constraints = {
test_scenario_id(blank:false)
myPriority()
myState()
myEnv()
system()
subSystem()
}
static mapping = {
table "test_exec_queue"
version false
columns{
test_scenario_id column:"test_scenario_id"
myPriority column:"Priority"
myState column:"State"
myEnv column:"Env"
system column:"system"
subSystem column:"subSystem"
}
}
Integer test_scenario_id
Integer myPriority
String myState
String myEnv
String system
String subSystem
}