I have a custom util class called LessonView. It looks like this:
public class LessonView{
| private String subject;
| private int year, count;
|
| public LessonView(){}
|
| public LessonView(String subject, int year, int count){
| sets the variables via setters
| }
|
| public getters and setters
| }
Then I have a query:
"select new LessonView(l.subject, l.year, count(*)) from Lesson l group by
l.lesson, l.year order by l.lesson, l.year";
This throws exceptions telling me there is no suitable constructor. When the
count(*) is removed everything works fine. I have used custom classes before
with sum(whatever.k) and it worked fine. I have also tried count(l.id), same
results.
Any idea how to fix this? The database is MySQL.
Thanks,
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021964#4021964
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021964
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user