s.CreateQuery("from Flier f where f.Client.Id = :clientId)
.SetParameter("clientId", clientId)
.List<Flier>();
On Wed, Sep 17, 2008 at 6:49 PM, Lars Zeb <[EMAIL PROTECTED]> wrote:
>
> I am a first-time user of NHibernate using v2.0. I coded the following
> criteria query which works.
> publicIList<Flier> GetClientID(intclientId){
> IList<Flier> fliers =
> session.CreateCriteria(typeof(Flier)).Add(Restrictions.Eq("Client.Id",
> clientId)).List<Flier>();
> return fliers;
> }
>
>
>
> class Flier
> Property int Id;
> Property Client client;
> ...
>
> class Client
> Property Id;
> ...
>
> Can anyone help me construct this same query using HQL? I cannot figure out
> how to get the clientId into the select statement.
>
> Thanks, Lars
>
>
>
>
> >
>
--
Ken Egozi.
http://www.kenegozi.com/blog
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
-~----------~----~----~----~------~----~------~--~---