nhibernate « HQL « JPA Q&A





1. How can I express this in HQL    stackoverflow.com

I've been stuck with this query for some time now. The SQL returns the result that I want, but I cannot work out how to express the query in HQL. Here's the ...

2. NHibernate: Return A Constant In HQL    stackoverflow.com

I need to return a constant from an HQL query in NHIbernate

SELECT new NDI.SomeQueryItem(user, account, " + someNumber + ") 
FROM NDI.SomeObject object
I am trying for something like above. I've ...

3. using hql in NHibernate    stackoverflow.com

I have two tables:

-- Table: medibv.btdbn

-- DROP TABLE medibv.btdbn;

CREATE TABLE medibv.btdbn
(
  mabn varchar(8) NOT NULL,
  hoten text,
  ngaysinh timestamp,
  namsinh varchar(4),
  phai numeric(1) DEFAULT 0,
  ...

4. NHibernate HQL logic problem    stackoverflow.com

I'm trying to write an NHibernate HQL query that makes use of parenthesis in the where clause. However, the HQL parser seems to be ignoring my parenthesis, thus changing the ...

5. nHibernate HQL dynamic Instantiation question    stackoverflow.com

I can't find what's going on with the following nHibernate HQL. here's my VB.Net code:

Return _Session.GetNamedQuery("PersonAnthroSummary").SetInt32(0, 2).UniqueResult()
My Named Query:
<sql-query name="PersonAnthroSummary">
           select New ...

6. HQL and grouping    stackoverflow.com

After much problems with using 'group by' in linq2nhibernate, I have tried to switch to HQL, but I am struggeling with a simple example. I have the following table (ForumThreadRatings):