Questions tagged «gorm»

12
在Grails中使用HibernateCriteriaBuilder时,为什么会收到“将Null值分配给原始类型设置器的属性”错误消息
在grails域对象中使用原始属性时,出现以下错误: Null value was assigned to a property of primitive type setter of MyDomain.myAttribute org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of MyDomain.myAttribute at grails.orm.HibernateCriteriaBuilder.invokeMethod(HibernateCriteriaBuilder.java:1077)
100 grails  gorm 

12
找到对集合org.hibernate.HibernateException的共享引用
我收到此错误消息: 错误:找到对集合的共享引用:Person.relatedPersons 当我尝试执行时addToRelatedPersons(anotherPerson): person.addToRelatedPersons(anotherPerson); anotherPerson.addToRelatedPersons(person); anotherPerson.save(); person.save(); 我的网域: Person { static hasMany = [relatedPersons:Person]; } 知道为什么会这样吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.