This is what the spec says:
[i]3.6.6 SQL Queries
Queries may be expressed in native SQL. The result of a native SQL query may consist of entities, scalar values, or a combination of the two. [...] When multiple entities are returned by a SQL query, the entities must be specified and mapped to the
column results of the SQL statement in a SqlResultSetMapping metadata definition.[/i]
So no, if you return back only scalar values, you don't need SqlResultSetMapping.
Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]
http://forums.java.net/jive/thread.jspa?messageID=250890