dagda1 wrote:
Hi,
Where can I find information on how to use Generics and Nullable types that are now available with NHibernate 1.2.
Thanks
Paul
My best guess would be the doc folder that comes with the installation.
For generics it basically it comes down to setting the 'generic="true" attribute on collections in your mapping files:
Code:
<set name="SomeCollection" ... generic="true">
and setting the type of the collection in your entity to a generic one, like ISet<SomeType>
For nullable types your property mapping would look like:
Code:
<property name="SomeNumber" ... type="Double" not-null="false" />
and the type of this property in your entity would be double? or Nullable<double>.