What real performance problems do you have?
You can always use StatelessSession if you want.

   Diego


On Thu, Apr 29, 2010 at 11:56, Matt Mangold <[email protected]>wrote:

> If that is the case, is it possible for me to load the results of my
> query into a POCO without the overhead of the NHibernate Session?
> These are read only reporting queries, but I still want to be able to
> display properties from my POCO that may not be mapped.  Ultimately,
> I'd like to retrieve POCO's from my reporting layer that are not
> loaded into the NHibernate session.
>
> On Apr 28, 8:23 pm, Diego Mijelshon <[email protected]> wrote:
> > If a property is unmapped, from NHibernate's perspective it doesn't
> exist.
> > A reasonable alternative is creating a query only property (seehttp://
> ayende.com/Blog/archive/2009/06/10/nhibernate-ndash-query-only...)
> > which replicates the logic of Age, but in SQL.
> > It's a bit of a hack, but at least it's transparent to your queries.
> >
> >    Diego
> >
> > On Wed, Apr 28, 2010 at 18:29, Matt Mangold <[email protected]
> >wrote:
> >
> >
> >
> > > I would like to know if it is possible to create a query where I add
> > > an unmapped property to my projected output.
> >
> > > Here is an example
> >
> > > I have a class called Person
> >
> > > Person has 3 properties
> > > Name
> > > Birthday
> > > Age
> >
> > > Name and Birthday are mapped to the database, and Age is calculated
> > > based on today's date, hence it is not mapped.
> >
> > > When I create a criteria query and I add Age to my projections list, I
> > > get an error when I execute the query:
> >
> > > NHibernate.QueryException: could not resolve property: Age
> >
> > > Does anyone know if I am able to put unmapped properties from my
> > > entity into my query projections?
> >
> > > --
> > > 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]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/nhusers?hl=en.
> >
> > --
> > 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 athttp://
> groups.google.com/group/nhusers?hl=en.
>
> --
> 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.
>
>

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