Search code examples
.netasp.netnhibernatehqlcriteria

Is there any easy way to convert Criteria to HQL?


I have posted a question few days ago about Querying on collections with the Criteria API and after all the answers I see that the thing that I am trying is not possible with the Criteria, there is a bug for the situation in nhibernate and also in hibernate

I was using DetachedCriteria to get all criterias together and the list is really long. The last circle of chain is buggy criteria so I need to change all my detachedcriteria to HQL.

So my question is is there any tool or way to convert Criteria to HQL.

or

Is there any way to get Criteria and Hql work together?

An Article about the bug in nhibernate


Solution

  • I have sent an email to Ayende Rahien about the issue and thank to him for replying.He said that

    the answer is that there is no such tool, but conversion is usually pretty easy.