PDA

View Full Version : NHibernate.Nullables / Binding


wmopnc
05-04-2005, 03:05 AM
Just to make if official I'd like to request that Spring.Web have some sort of support for NHibernate.Nullables bindings. I'm not a .NET expert at all but I believe who ever designed NHibernate.Nullables designed them similar in fashion to the new support for Nullables in C# 2.0. I hope this makes it easy to implement. Does this request make sense?

Aleks Seovic
05-07-2005, 08:36 AM
I'm not very familiar with NHibernate, so if you could elaborate a bit on the desired behavior I'd appreciate it.

One concern I have is that we need to make sure that Spring.Web doesn't have a dependency on NHibernate. As long as that's the case and I understand what needs to be done to support Nullables, I have no problem doing it.

Regards,

Aleks

wmopnc
05-07-2005, 09:05 PM
For instance lets say we have a value that can be null or int, same as in a database column. Since C# does not have a type Integer like they do in java where the value can actually be null you cannot really represent this in c#/Spring.Web without storing you value as a string and converting as needed. At this point the bindings that Spring.Web offer don't really help me out. I might as well right the code myself by hand.

NHibernate.Nullables is an unfortunate name for this namespace because its not really NHibernate specific. Its in their contrib distro. I know that the next ver of c# is supposed to have nullables I'm just not sure how they implemented them.

Please let me know if I'm not making sense?

Thanks!

wmopnc
05-07-2005, 09:07 PM
NHibernate is at http://nhibernate.sourceforge.net. Its a port for the java version of Hibernate http://www.hibernate.org.

wmopnc
05-07-2005, 11:25 PM
Okay I have probably confused some people here. The namespace is actually Nullables not NHibernate.Nullables. Sorry was not paying attention. It appears the crew from NHibernate wrote it as "A library of Nullable version of the ValueTypes in net-1.1. It is meant to serve as a bridge until .net-2.0 comes out with their own Nullables." Hope this helps.