[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - SqlResultSetMapping
stupar.aleksandar
do-not-reply at jboss.com
Thu Jun 21 06:05:07 EDT 2007
Hi,
I have run into a problem using SqlResultSetMapping.
I have defined next SqlResultSetMapping:
@SqlResultSetMapping(name ="Proba",
| entities = {@EntityResult(entityClass=ReportAllTemp.class,
| fields = {
| @FieldResult(name = "locationId",column = "LOCATION_ID"),
| @FieldResult(name = "locationName",column = "LOCATION_NAME"),
| @FieldResult(name = "month",column = "MONTH"),
| @FieldResult(name = "personId",column = "PERSON_ID"),
| @FieldResult(name = "projectId",column = "PROJECT_ID"),
| @FieldResult(name = "projectName",column = "PROJECT_NAME"),
| @FieldResult(name = "taskId",column = "TASK_ID"),
| @FieldResult(name = "taskName",column = "TASK_NAME"),
| @FieldResult(name = "workHours",column = "WORK_HOURS")
| }
| )}
| )
and I'm using in like this:
Query q =em.createNativeQuery("select r.* from report_all ","Proba");
| List reports = q.getResultList();
| return reports;
I thought that it was all ok but Hibernate throws an exception and
JBOSS says INVALID COLUMN NAME even all columns are defined in report_all.
Thank you in front.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056370#4056370
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056370
More information about the jboss-user
mailing list