Right!!

Finally back on this!!

Thanks Tuna - exactly what I needed.

I did spot a bug in the docs there tho - how do I get it corrected?


<docs>

It is possible to apply an IResultTransformer to native sql queries.
Allowing it to e.g. return non-managed entities.

sess.CreateSQLQuery("SELECT NAME, BIRTHDATE FROM CATS")
        .SetResultTransformer(Transformers.AliasToBean(typeof
(CatDTO)))

This query specified:

    *

      the SQL query string
    *

      a result transformer

The above query will return a list of CatDTO which has been
instantiated and injected the values of NAME and BIRTHNAME into its
corresponding properties or fields.

</docs>

that last line should read:

<docs>
The above query will return a list of CatDTO which has been
instantiated and injected the values of NAME and BIRTHDATE into its
corresponding properties or fields.
</docs>

iI'm going to try this out now  - I'll let you know how I get one :)


On Aug 28, 2:22 pm, Tuna Toksoz <[email protected]> wrote:
> Sorry this 
> onehttp://knol.google.com/k/fabio-maulo/nhibernate-chapter-14/1nr4enxv3d...
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
> On Fri, Aug 28, 2009 at 4:22 PM, Tuna Toksoz <[email protected]> wrote:
> > Yes,
>
> >https://www.hibernate.org/hib_docs/nhibernate/html/querysql.html
>
> >  <https://www.hibernate.org/hib_docs/nhibernate/html/querysql.html>
> > Tuna Toksöz
> > Eternal sunshine of the open source mind.
>
> >http://devlicio.us/blogs/tuna_toksoz
> >http://tunatoksoz.com
> >http://twitter.com/tehlike
>
> > On Fri, Aug 28, 2009 at 4:19 PM, [email protected] <
> > [email protected]> wrote:
>
> >> with CreateSqlQuery can the results be mapped to an entity that
> >> doesn't reflect a table in the db?
>
> >> On Aug 28, 2:13 pm, Tuna Toksoz <[email protected]> wrote:
> >> > you mean .CreateSqlQuery, then?
>
> >> > Tuna Toksöz
> >> > Eternal sunshine of the open source mind.
>
> >>http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitt...
>
> >> > On Fri, Aug 28, 2009 at 3:40 PM, [email protected] <
>
> >> > [email protected]> wrote:
> >> > > ly - this maps the results to a set of entities already mapped :
--~--~---------~--~----~------------~-------~--~----~
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