Question - Issue NH2951 - HQL

35 views
Skip to first unread message

Rafael Lillo

unread,
Sep 16, 2019, 3:58:31 PM9/16/19
to nhibernate-development
Hi,

I'm trying to resolve issue NH2951, NHIbernate translate

update Invoice i set i.Customer = (select c from Customer c where c.Name = 'Bob')

to:

update Invoice set Customer=(select Id from Customer customer1_ inner join Entity customer1_1_ on customer1_.Id=customer1_1_.Id where customer1_.Name='Bob')

but I'm not find where NHibernate make the translate, more specific where I see NHibernate translate:

select c from Customer c

to:

select Id from Customer customer1_

Is there some class you recommend to me look? Or some tips for debug HQL?

Roman Artiukhin

unread,
Sep 17, 2019, 6:32:14 PM9/17/19
to nhibernate-development
Hi,

I'm not the expert in hql code. So for me the easiest way to debug all hql transformations is by setting breakpoint inside setter of SqlNode.Text. And then check why and where suspicious value is set by visiting stacktrace.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages