Regarding this bug, it is very simple to fix, I tried it locally and
it worked perfectly.
On Hql\Ast\HqlTreeNode.cs, class HqlIdent, we have this:

switch (System.Type.GetTypeCode(type))
                        {
                                case TypeCode.Boolean:
                                        SetText("bool");
                                        break;
                                case TypeCode.Int16:
                                        SetText("short");
                                        break;
                                case TypeCode.Int32:
                                        SetText("integer");
                                        break;
                                case TypeCode.Int64:
                                        SetText("long");
                                        break;
                                case TypeCode.Decimal:
                                        SetText("decimal");
                                        break;
                                case TypeCode.DateTime:
                                        SetText("datetime");
                                        break;
                                case TypeCode.String:
                                        SetText("string");
                                        break;
                                case TypeCode.Double:
                                        SetText("double");
                                        break;
                                default:
                                        if (type == typeof(Guid))
                                        {
                                                SetText("guid");
                                                break;
                                        }
                                        throw new 
NotSupportedException(string.Format("Don't currently
support idents of type {0}", type.Name));
                        }

And what I did was add this case, which was missing:

                                case TypeCode.Single:
                                        SetText("single");
                                        break;

Will any of the committers please have a look at this?

Thanks!

RP

On Jan 29, 6:53 pm, Ricardo Peres <[email protected]> wrote:
> My mistake: it should be SetText("single"), of course!
>
> Sorry!
>
> RP
>
> On Jan 28, 11:15 pm, Patrick Earl <[email protected]> wrote:
>
>
>
>
>
>
>
> > On Tue, Jan 24, 2012 at 4:24 AM, Ricardo Peres <[email protected]> wrote:
> > > Greetings, everyone!
>
> > > In the last days, a number of bugs showed up which didn't exist
> > > before; I assume they have something to do with recent refactorings.
>
> > > One is the inability to sum a Single property, whereas a Double,
> > > Int32, Int64, etc, will work. This happens, from what I can tell, for
> > > a missing condition in HqlIdent (file HqlTreeNode.cs):
>
> > > case TypeCode.Single:
> > > SetText("decimal");
> > > break;
>
> > Perhaps I misunderstand, but why would a single be a decimal?  decimal has
> > a different range and base than a single precision floating point number.
>
> >             Patrick Earl

Reply via email to