English 中文(简体)
铁路网流中的“非不动产参考资料是无效或瞬间价值”例外
原标题:Grails "not-null property references a null or transient value" exception on web flow

I m getting "org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value: A.b" exception on web flow in grails 1.1.2. there is

class B {
   ...
   static belongsTo = [a:A]
   ...
}

以及

class A {
   ...
   static hasMany = [b:B]
   ...
}

Does anyone know what is wrong? Thanks Tom

最佳回答

溶解。

还有一个不同的问题。 我没有坚持任何事情。 流动中序列化数据之间似乎有一些不一致之处,数据库中的数据一直存在。 因此,一个选择性的争论造成了这一例外。

问题回答

这实际上将主要取决于您的参数,以及你如何重新处理建立或维护GORM的物体,而不是你的实际物体图。

Agree with @John. 一种共同的解决办法是,你应当把目标作为保留对象。

a.addToB(b)
a.save()

希望会有所助益。

这个问题与人力资源管理厅有关(我猜测你正在使用下文中解冻剂)。 如果你没收被绘制地图的特性的连带财产,这个问题将得到解决。

我不知道如何将它混入铁路,但这种秘密的理论应当有助于你了解问题所在之处:





相关问题
grails + gwt request handling via controllers

I am new to gwt. I am trying to integrate gwt+grails.Can anybody provide me a good example for handling the request using grails controllers and not a custom servlet.I will be really thankful if ...

Error loading the grails gwt module xml

I ve installed the plugin from this article by Peter http://www.cacoethes.co.uk/blog/groovyandgrails/the-command-pattern-w.... While compile time its not able to find the module file which is present ...

Sorting Objects Based on Custom Domain Class Methods

I have a domain class, in which I ve defined some methods which give the object a score based on different algorithms (eg. popularity). I now want to retrieve a list of these objects sorted by one of ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

Hibernate/GORM: collection was not processed by flush()

I have an integration test in my Grails application that fails when I try to save an entity of type Member invitingMember.save(flush: true) This raises the following exception org.hibernate....

热门标签