it looks as if you are trying to emulate the SELECT clause of SQL in
NHibernate.

the SELECT clause is SQL implementation for the Projection concept.
in NH you do this like that:

in the Criteria API, you use .SetProjection

in HQL you can either add a select clause with the needed properties and use
AliasToBean result transformer, or use select new MyProjection(a.field,
b.field1, b.field2, ...), and import the projected type into the mapping
using 'import' directive



On Sat, May 2, 2009 at 12:12 PM, Action Jackson <[email protected]> wrote:

>
>
>   Has anyone come up with a solution to the problem whereby you need
> to selectively choose which properties are retrieved in a select
> statement for lazy loads?  For example, let's say class A has a
> reference to class B and class B has lots of properties.  However, I
> would only want to select a couple of properties from class B when
> retrieving class A.  Does anyone know how to handle this scenario?  I
> know we can control inserts and updates pretty easily with the
> "insert" and "update" xml attributes.  Is there a "select" equivalent?
>
> >
>


-- 
Ken Egozi.
http://www.kenegozi.com/blog
http://www.delver.com
http://www.musicglue.com
http://www.castleproject.org
http://www.gotfriends.co.il

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