-->
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: nhibernate and nulls?
PostPosted: Tue Oct 05, 2004 7:24 pm 
Newbie

Joined: Mon Sep 27, 2004 11:39 pm
Posts: 4
Question on using nullable columns and nhibernate:

There's a bit of a mismatch between nullable columns in your database, and .net value types such as DateTime, and Int32. I've noticed internally null dates are represented as DateTime.MinValue. So its possible to insert rows without setting the date, and they'll become null in the database. Possible to update a date field to MinValue, that also becomes null in the table... No such luck with ints!

Noticed nhibernate appears to have its own implementation of nullable types - DateTimeType extends Nullable type. Attempted to write my business entities using this type, but there doesn't seem to be any way to set a value on DateTimeType! Which makes me think it wasn't intended for what I'm doing.

Has anyone else run into (and solved) this??


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 06, 2004 7:18 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is an Hibernate forum, not NHibernate one.

_________________
Emmanuel


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.