[jboss-user] [EJB 3.0] - Problem with NamedNativeQuery
gmichalk
do-not-reply at jboss.com
Wed Sep 13 11:49:31 EDT 2006
Hi,
JBoss 4.0.4, Linux
| @NamedNativeQuery(name="nbQuestionnairesParEndroitEtDate",
| query="SELECT COUNT(*) AS nb, endroit AS e, MONTH(dateeven) AS m, YEAR(dateeven) AS y from questionnaires group by m,y, e order by e,y,m",
| resultSetMapping="NbQuestionnairesParEndroitEtDateMapping")
|
| @SqlResultSetMapping(name="NbQuestionnairesParEndroitEtDateMapping",
| columns={
| @ColumnResult(name="n"),
| @ColumnResult(name="y"),
| @ColumnResult(name="m"),
| @ColumnResult(name="e")
| })
This query is called with em.createNamedQuery("nbQuestionnairesParEndroitEtDate").getResultList();
What I do not know is what bean to write ?
Would somebody have a working example ? The examples I found only do rely on an existing entity bean, but not on report
Thanks in advance,
Gerd
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971297#3971297
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971297
More information about the jboss-user
mailing list