[jboss-user] [JBoss Seam] - Re: Framework: Counting query entities

2007-04-17 Thread CptnKirk
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 tag. But that's pr

[jboss-user] [JBoss Seam] - Re: Framework: Counting query entities

2007-04-17 Thread [EMAIL PROTECTED]
mmh, interesting. This should work for my quoted query. But you cannot define the query within components.xml anymore, can you? I really love that feature because it saves me countless simple & stupig classes. Chris View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopi

[jboss-user] [JBoss Seam] - Re: Framework: Counting query entities

2007-04-17 Thread [EMAIL PROTECTED]
our solution to this was | @Override | protected String getCountEjbql() { | String countEjbql = super.getCountEjbql(); | return countEjbql.replaceAll("join fetch", "join" ); | } | View the original post : http://www.jboss.com/index.html?module=bb

[jboss-user] [JBoss Seam] - Re: Framework: Counting query entities

2007-04-17 Thread [EMAIL PROTECTED]
Thanks Captain! I'll do it your way. Of course a framework:entity-query in components.xml would have been nicer. I believe you cannot automatically deviate a correct count query from any ejb/hql query in general, can we Gavin? If this is true we should think about a countEjbql attribute on fr

[jboss-user] [JBoss Seam] - Re: Framework: Counting query entities

2007-04-16 Thread CptnKirk
Oops, PersonQuery class in the last code block should be MyQuery. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037846#4037846 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037846 _

[jboss-user] [JBoss Seam] - Re: Framework: Counting query entities

2007-04-16 Thread CptnKirk
Looks like a problem to me. As a work around try something like: @Name("myQuery") | public class MyQuery extends EntityQuery | { | protected String getCountEjbql() | { | return "select count(*) without fetch"; | } | | public String getEjbql() | {

[jboss-user] [JBoss Seam] - Re: Framework: Counting query entities

2007-04-16 Thread [EMAIL PROTECTED]
Hey! Bump :D I cannot believe nobody else is currently using the great seam framework without state of the art pagination? Best, Chris View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037808#4037808 Reply to the post : http://www.jboss.com/index.html?mod