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() | { | return "original query"; | } | } | Not as great as the components.xml solution, but should keep you functioning until this is sorted out.
Oh what the heck, you should be able to smack things around a bit. Maybe even even include some components.xml like this. <component name="someQuery" auto-create="true" class="x.y.MyQuery"> | <property name="countEjbql">select count(*) no fetch</property> | <property name="ejbql">original</property> | </component> | | <component name="OtherQuery" auto-create="true" class="x.y.MyQuery"> | <property name="countEjbql"></property> | <property name="ejbql"></property> | </component> not sure if the countEjbql stuff has a public setter might need to add one. I guess in the end you have something like: public class PersonQuery extends EntityQuery | { | private String countEjbql; | | protected String getCountEjbql() | { | return countEjbql; | } | | public void setCountEjbql(String query) | { | countEjbql = query; | } | } I haven't tried any of this, but it sounds about right to me. Let me know. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037844#4037844 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037844 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user