-->
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.  [ 1 post ] 
Author Message
 Post subject: DateTimeSqlType vs. NullableDateTime
PostPosted: Tue Sep 20, 2005 2:14 pm 
Newbie

Joined: Tue Sep 20, 2005 1:54 pm
Posts: 1
I am new to NHibernate and .NET in general. My problem is with nullable DateTime fields and I have found several other posts dealing with the topic. Some notable suggestions include:

Using NullableDateTime from NHibernateContrib:

http://nhibernate.sourceforge.net/forum ... .php?t=240

Changing the DateTimeType class (which means remembering to make the same change every time NHibernate is updated):

http://nhibernate.sourceforge.net/forum ... c.php?t=22

What is wrong with just using DateTimeSqlType? I tried a very simple test, and it appears to support null values without a problem. What about NullableType?

Has anyone tried more than one of these techniques or have advice regarding which one to use?

Thanks,

Chris

[UPDATE]
I took my simple test a little farther, and it looks like DateTimeSqlType is not meant to hold a DateTime value. I suppose that rules DateTimeSqlType out, so the only options left are the 2 mentioned in the threads above.


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

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.