Take a look at ejb3_0-pdf-spec-persistence.pdf, section 9.1.25...
You could use MapKey annotation for that.
Thanks for the reply, but I do not know if this is going to help me too much, I might be wrong, I am fairly new to JPA.
Let me clarify a bit. My ResultSet from a Callable Statement returns an unknown number of fields, which I cannot specify at design time to map to fields of a POJO.
The only alternative I can see, is if somehow the ResultSetMetaData for this ResultSet can be used by the ejb Query if have executed to map all fields to various keys of a Map with a List of values for the specific column or a single Object per key if there is only 1 row.
Is this at all possible?
Any help always appreciated.
you should be able to just execute the native sql and you would get an Object back.
If you can use the hibernate api you can look at ResultTransformer API