-->
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: Is Dirty problem...
PostPosted: Thu Jun 09, 2005 6:06 pm 
Newbie

Joined: Thu Jun 09, 2005 5:32 pm
Posts: 2
Hi

When flushing the session, NHibernate tries to update all the entities loaded until that moment. It says that one of the attributes is dirty. This specific attribute is DATE type and allows null.

I've noticed that when hydrating the object, the NULL value from Oracle is being converted to System.DateTime.MinValue (1/1/1).

After that, when the NHibernate.Type.DateTimeType tries to compare the two entities, the dirty is done (1/1/1 != <undefined value>).

Any idea?

I'm using NHibernate 0.8.4.0 with Oracle 9.2.0.6.0

Any help would be appreciated.

Guilherme Guimaraes.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 11, 2005 5:48 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You should use NullableDateTime from NHibernateContrib, or create your own IUserType for dates which will convert between DateTime.MinValue and null. There's no straightforward solution for this problem yet.


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.