-->
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: How to save a null date?
PostPosted: Mon Apr 25, 2005 9:02 pm 
Beginner
Beginner

Joined: Wed Apr 13, 2005 2:03 pm
Posts: 34
Hibernate 3.0
MySQL

I have an object which contains a date field named "closedDate".
The field is mapped to a tapestry timestamp field.

Everything works fine if I put data into the date.

However, the business process I am modelling requires that sometimes this date be null. Specifically, if a document is still open, it'll have a closedDate of null.

When I try to save an object with a null closedDate ... it works.

But, when I load it back in, I get a null pointer exception.

Is there a trick to allow nulls in a Date (or any other object field) for that matter? Null strings seem to work fine, but null Dates aren't working for me.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 11:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
null values for dates should work fine. what's your stack trace?


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.