I get the following error when using a primitive attribute in my grails domain object:
Null value was assigned to a property of primitive type setter of MyDomain
Either fully avoid null in DB via NOT NULL and in Hibernate entity via @Column(nullable = false) accordingly or use Long wrapper instead of you long primitives.
null
NOT NULL
@Column(nullable = false)
Long
long
A primitive is not an Object, therefore u can't assign null to it.