This content has been marked as final.
Show 2 replies
-
1. Re: createNativeQuery(
redijedi Nov 21, 2005 10:12 PM (in response to mcrenshaw)I take it your query returns a scalar? That is not yet implemented. I've seen it around in various docs that it will be in the future. The workaround is to map the result set to an entity and use the property of the entity to access the scalar. Atleast, this is how I did it. You could generalize this into a wrapper for int that has a set{ColumnName} method that you then map to the scalar. A lot of work, but maybe better than mapping an entire entity.
-
2. Re: createNativeQuery(
epbernard Nov 25, 2005 4:46 AM (in response to mcrenshaw)the other solution would be to access the underlying conection by doing
( ( HibernateEntityManager) em).getSession().connection()