If you use HQL it would be CashPosting...

If you use SQL then it would be List<objects>, you should manualy
convert them in to CashPosting.

On 28 maj, 11:06, Vikas Singh <[email protected]> wrote:
> What would we return type here if we have list
>
> IList<CSTS.Main.CashPosting> cashpostlist =
> query.List<CSTS.Main.CashPosting>();
>
> On May 28, 5:01 pm, Mitjast <[email protected]> wrote:
>
> > If you are trying to do HQL you should use join like this.
>
> > FROM CashPosting C INNER JOIN c.FundGroup as F where ....
>
> > other wise you can use
>
> > session.CreateSQLQuery("Select * FROM CashPosting C INNER JOIN
> > FundGroup
> > F On C.Acct_Cd=F.Acct.Cd WHERE F.Acct_Grp_Cd='ASPRUI'")
>
> > hope i helped you.
>
> > On 28 maj, 10:09, Viki <[email protected]> wrote:
>
> > > Hi,
>
> > > I am doing query from 2 table using join.
>
> > >  config = new NHibernate.Cfg.Configuration();
> > >         config.AddAssembly(typeof(CSTS.Main.CashPosting).Assembly);
> > >         factory = config.BuildSessionFactory();
> > >         session = factory.OpenSession();
>
> > >   query = session.CreateQuery("FROM CashPosting C INNER JOIN FundGroup
> > > F On C.Acct_Cd=F.Acct.Cd WHERE F.Acct_Grp_Cd='ASPRUI'");
>
> > >  IList<CSTS.Main.CashPosting> cashpostlist =
> > > query.List<CSTS.Main.CashPosting>();
> > >         grdAll.DataSource = cashpostlist;
> > >         grdAll.DataBind();
>
> > > Here i am adding assebely of Cashposting only not for Fundgroup, so I
> > > am getting error.
>
> > > outer or full join must be followed by path expression [FROM
> > > CSTS.Main.CashPosting C INNER JOIN FundGroup F On C.Acct_Cd=F.Acct.Cd
> > > WHERE F.Acct_Grp_Cd='ASPRUI']
>
> > > how can we do nhibernate query with join???- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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