I don't think there is anything complex about the mapping - it is just
a nullable decimal property mapped to a decimal column in the
database:

public class MyEntity
{
    public decimal? NullableDecimalProperty { get; set; }
}

Mapped using FluentNHibernate:
public sealed class MyEntityClassMap : ClassMap<MyEntity>
{
    public MyEntityClassMap()
    {
         ... etc ...
         Map(x => x.NullableDecimalProperty)
              .Nullable();
    }
}


The same idea for the first example, except it was a Money struct and
I have a customer UserType to handle the Money struct.


On Nov 30, 12:32 pm, Fabio Maulo <[email protected]> wrote:
> Without mappings and classes we can't say where is the bug.
> Too much mysteries... starting from NullableDecimalProperty
>
> 2009/11/29 acl123 <[email protected]>
>
>
>
> > Similar bug, this time without the custom user type:
>
> > Session.CreateCriteria<MyEntity>()
> >                .SetProjection(LambdaProjection.Min<MyEntity>(x =>
> > x.NullableDecimalProperty))
> >                .FutureValue<decimal?>();
>
> > Results in the exception:
>
> > System.ArgumentException: The value "" is not of type
> > "System.Nullable`1[System.Decimal]" and cannot be used in this generic
> > collection.
> > Parameter name: value
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<nhusers%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.
>
> --
> Fabio Maulo

--

You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to