-
1. Re: ql and COUNT() - return type ?
draftdog Dec 1, 2003 6:29 AM (in response to nefilim)hi Peter,
make sure you implement this method as an select method and not as a finder method
assuming you're using xdoclet you will need to add a class-level tag @ejb.select and specify the query there, you will then also need to write a method for this query
there are many examples to be found on the internet that explain how to achieve this, but let me point you to a working example of mine, it is a bean generated by AndroMDA using a custom template, it automatically generates some default finders and selects
http://cvs.sourceforge.net/viewcvs.py/jeteam/ejb/src/java/org/jeteam/business/note/NoteBean.java?view=markup
my primary keys are Strings while the COUNT returns a java.lang.Long
hth
Wouter. -
2. Re: ql and COUNT() - return type ?
draftdog Dec 1, 2003 6:36 AM (in response to nefilim)correction, it is not @ejb.select but @jboss.query you will need to add at the class level
this will make ejbdoclet render this as JBoss-QL (also notice the 'dynamic' attribute (for dynamic-ql)
anyway, taking a look at the tags + methods should give you an idea