Beginner |
 |
Joined: Thu Dec 04, 2003 3:47 am Posts: 31 Location: Hong Kong
|
i have a nullable field with long java type in a java object. When I persist the object without setting the field, the following error occurs
Caused by: net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of ...
If I change the type to Long, there would be no problem.
I want to ask if I have to use Java Wrapper class for all nullable fields? I can't use any primitive type in nullable field? or is there any workaround? (if i want to use the primitive type). Thank.
|
|