-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: nullable fileld
PostPosted: Wed Feb 04, 2004 10:22 pm 
Beginner
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 11:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Please read the FAQ.

I hope you have read the instructions for using the forum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.