see IProjection.SqlFunction

2009/6/4 Darius Damalakas <[email protected]>

>
> Great! Thanls Fabio for the HQL examples, these helps me alot and
> saves a lot of time searching internet. I am actually having problems
> even googling for NH documentation. (i hope it's just my fault :), and
> not overal lack of documentation).
>
>
> Coul you please give an example how to use month HQL keyword with
> CriteriaAPI?
>
> I am actually building a customizable charting form, where you can
> choose filters dynamically browsing through all applicaion model
> hierarchy, so HQL is not that suitable here, although technically
> feasible
>
>
> On Jun 4, 3:44 pm, Paulo Quicoli <[email protected]> wrote:
> > hehehe Fábio, i guess everyone that came from Delphi to .net + Nhibernate
> > have used tiOPF or IO... i did that too!!! hehehhe
> >
> > :)
> >
> > 2009/6/4 Fabio Maulo <[email protected]>
> >
> >
> >
> > > ex delphi user, ex moderator of "Delphi avanzado", ex developer of some
> > > DevExpress "extension components"...After study tiOPF<
> http://tiopf.sourceforge.net/>and  InstantObject ... well... you know NH
> is another thing ;)
> >
> > > 2009/6/4 Paulo Quicoli <[email protected]>
> >
> > >> Hi Fabio!
> >
> > >> so, you are an "ex delphi user" ! I still use delphi :)
> >
> > >> bye!
> >
> > >> 2009/6/4 Fabio Maulo <[email protected]>
> >
> > >>> For EXTRACT is better if you use the HQL function (HQL are
> multi-RDBMS)select
> > >>> count(*), month(a.FinishDate), year(a.FinishDate) .......
> >
> > >>> NH will translate "month(a.FinishDate)" with the appropriate FB
> sentence.
> >
> > >>> 2009/6/4 Darius Damalakas <[email protected]>
> >
> > >>>> I am issuing a query with groups tasks by the month they where
> > >>>> finished.
> > >>>> However, this sql is in plain sql. Is it possible to use firebird
> > >>>> function EXTRACR with HQL or CriteriaAPI?
> >
> > >>>> This is my original query:
> > >>>> IList results = session.CreateSQLQuery(
> > >>>> @" SELECT count(*),
> > >>>>        EXTRACT (MONTH FROM a.FINISH_DATE) as mmonth,
> > >>>>        EXTRACT (Year FROM a.FINISH_DATE) as yyear
> > >>>> FROM PUV_TASK a
> > >>>> GROUP BY mmonth,
> > >>>>        yyear
> > >>>>        order by
> > >>>>        yyear, mmonth").List();
> >
> > >>>> Thanks!
> >
> > >>> --
> > >>> Fabio Maulo
> >
> > >> --
> > >> Paulo R. Quicoli
> >
> > >> Editor Técnico - ClubeDelphi Magazine - DevMedia
> >
> > > --
> > > Fabio Maulo
> >
> > --
> > Paulo R. Quicoli
> >
> > Editor Técnico - ClubeDelphi Magazine - DevMedia
> >
>


-- 
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