Criteria
* Nicer api if you want to build the query at runtime.
* Can query non mapped types

HQL
* Can be "pre parsed"
* Easier (?) syntax for dba:s
* Collection stuff (elements, all, minIndex, maxIndex etc) are better supported 
in HQL afaik


(Certainly there are more diffs, but these were the ones that instantly popped 
up in my head)


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
dnagir
Sent: den 19 maj 2009 12:18
To: nhusers
Subject: [nhusers] HQL vs Criterion


Hi,

I read somewhere that HQL is a bit more powerful that Criteria API.

Just wondering what we cannot do in HQL and cannot in Criteria API.
And vice versa.

I'm very new to NH so soryy of this is too obvious question.
For me it looks like Criteria API is much more powerful (though
usually requires a bit more code to write) and I like it.

Cheers,
Dmitriy.



--~--~---------~--~----~------------~-------~--~----~
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