Hi guys,
I'm trying to execute a simple native query using JBoss 4.0.5GA and EJB 3.0.
Here is my entity bean with the SqlResultSetMapping annotation:
@SqlResultSetMapping(name="poiResultsMapping",
| entities=(a)EntityResult(entityClass=POI.class,
| fields=@FieldResult(name="name",
column="POI_NAME")))
| @Entity
| public class POI implements java.io.Serializable { ... }
Here is the native query which fails in the session bean.
| q = em.createNativeQuery("select p.POI_NAME from poi as p limit 8",
"poiResultsMapping");
|
| this.poiResults = q.getResultList();
|
This is the cause of the error :
2007-09-17 13:36:53,608 INFO [org.hibernate.type.LongType] could not read column value
from result set: POI2_12_0_;
Do you see what could be wrong with this code ? Did I forget something ?
Regards.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085040#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...