在 Grails 域对象中,我正在尝试更改域对象
class Example {
String name
static hasMany = [objs:DomainObject]
}
至
class Example {
String name
List objs
static hasMany = [objs:DomainObject]
}
我得到这个错误。
ERROR errors.GrailsExceptionResolver - HibernateException occurred when processing request: [GET] /path/path
null index column for collection: com.XXXX. Stacktrace follows:
org.hibernate.HibernateException: null index column for collection: com.XXXXXX
at grails.converters.JSON.value(JSON.java:174)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.render(JSON.java:134)
at grails.converters.JSON.render(JSON.java:150)
at com.XXXXController.Method(XXXXController.groovy:161)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)`
这发生在生产服务器上。我无法从数据库中删除任何内容,但我可以填写空列。我需要在引导程序中做什么才能修复或更改当前数据库中的数据?