[英]Grails , resolve conflict between migration plugin and searchable plugin
我在grails( 版本2.3.0 )上同時使用了遷移插件( 版本1.3.8 )和可搜索插件( 版本0.6.5 ),但是我無法管理使可搜索插件在遷移插件之后運行。
我搜索並找到了解決方案:
將此添加到config.groovy
bulkIndexOnStartup = false
mirrorChanges = false
並將其添加到bootstrap.groovy
searchableService.reindex()
searchableService.startMirroring()
但這沒有幫助。
這是我得到的錯誤:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.address' in 'field list'
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
.
.
.
Error executing script DbmGormDiff: org.compass.gps.CompassGpsException: Failed to index, execution exception; nested exception is java.util.concurrent.ExecutionException: org.compass.gps.device.hibernate.HibernateGpsDeviceException: {hibernate}: Failed to index the database; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query using scroll (Use --stacktrace to see the full trace)
謝謝,
直到獲得永久解決方案,我才這樣做。
1.注釋掉buildConfig.groovy中的可搜索插件 (當您運行下一個grails命令時,它將自動卸載)
2.使用遷移插件做您想做的一切
3.取消注釋buildConfig.groovy中的可搜索插件 (運行下一個grails命令時,它將自動安裝)
但仍然好奇地知道為什么這樣做:
bulkIndexOnStartup = false
mirrorChanges = false
直到引導程序才禁用插件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.