Hibernate Gorm查找或保存多个

Hibernate Gorm查找或保存多个,hibernate,grails,gorm,Hibernate,Grails,Gorm,我可能在多重查找或保存中遇到问题 这里是init进程 Typecard Typecard=Typecard.findOrSaveByName(“人员”) 提案=提案。findOrSaveByName(“提案1”) 提案proposal1=提案。findOrSaveByName(“提案2”) 第一次保存序列工作完美 卡片=新卡片(类型卡片:类型卡片,提案:[提案]) card.save() 但是,第二个序列不起作用:( Card.FindorSaveByTypeCard和Proposal(type

我可能在多重查找或保存中遇到问题

这里是init进程

Typecard Typecard=Typecard.findOrSaveByName(“人员”)

提案=提案。findOrSaveByName(“提案1”)

提案proposal1=提案。findOrSaveByName(“提案2”)

第一次保存序列工作完美

卡片=新卡片(类型卡片:类型卡片,提案:[提案])

card.save()

但是,第二个序列不起作用:(

Card.FindorSaveByTypeCard和Proposal(typecard,[proposal1])

我的问题很简单:为什么?如果你有想法

这是错误日志

Error |
2014-12-11 23:37:41,586 [localhost-startStop-1] ERROR spi.SqlExceptionHelper  - Parameter "#3" is not set; SQL statement:
select this_.id as id1_0_0_, this_.version as version2_0_0_, this_.typecard_id as typecard3_0_0_ from card this_ where this_.typecard_id=? and this_.id=? limit ? [90012-176]

Error |
2014-12-11 23:37:41,600 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: Hibernate operation: could not extract ResultSet; uncategorized SQLException for SQL [n/a]; SQL state [90012]; error code [90012]; Parameter "#3" is not set; SQL statement:
select this_.id as id1_0_0_, this_.version as version2_0_0_, this_.typecard_id as typecard3_0_0_ from card this_ where this_.typecard_id=? and this_.id=? limit ? [90012-176]; nested exception is org.h2.jdbc.JdbcSQLException: Parameter "#3" is not set; SQL statement:
select this_.id as id1_0_0_, this_.version as version2_0_0_, this_.typecard_id as typecard3_0_0_ from card this_ where this_.typecard_id=? and this_.id=? limit ? [90012-176]
Message: Hibernate operation: could not extract ResultSet; uncategorized SQLException for SQL [n/a]; SQL state [90012]; error code [90012]; Parameter "#3" is not set; SQL statement:
select this_.id as id1_0_0_, this_.version as version2_0_0_, this_.typecard_id as typecard3_0_0_ from card this_ where this_.typecard_id=? and this_.id=? limit ? [90012-176]; nested exception is org.h2.jdbc.JdbcSQLException: Parameter "#3" is not set; SQL statement:
select this_.id as id1_0_0_, this_.version as version2_0_0_, this_.typecard_id as typecard3_0_0_ from card this_ where this_.typecard_id=? and this_.id=? limit ? [90012-176]
我创建了see登录完整性的要点


例如,我创建了一个简单的应用程序

,看起来它可能是GORM和/或Hibernate中的一个bug。如果您在上提交报告并附加一个简单的示例应用程序来演示问题,我们可以进行研究。很抱歉给您添麻烦。谢谢,我成功了:)