Lol, should really not drink and make forum posts. :) A combination of dsmith's
solution and my components.xml should give you what you're looking for. You only need
1 small class that you reuse in components.xml. You could even write your own namespace
and have your own <myframework:entity-query> tag. But that's probably overkill,
the <component...> syntax isn't that verbose.
Although I haven't tried it, you may even be able to use the class attribute on
<framework:entity-query> to tell Seam to use your EntityQuery subclass. If so,
great. You have plenty of options.
Based on the HQL, you'd think that Hibernate should be able to look at any digested
query that has a single return and determine the correct count() syntax. Even eliminate
unnecessary joins like the one you have here. Given how frequently this is used I think
this would be a great convenience feature, especially for folks that use the Criteria
APIs.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038001#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...