Sorry, couldn't connect to the Hibernate forum, so I report it in here instead even though I'm not sure certain if it already has been solved.
Executing an SQL query using executeNativeQuery via a JPA entity manager will not return the same values in the columns as if I executed the query in my PostgreSQL prompt. The thing seems to be when I request the same field or table multiple times but using the same name.
In this case the value for column 0 and 1 is always equal to the value of column 2 and 3 (currency and value) when using createNativeQuery but works just fine when executing the SQL manually in psql. The same thing goes for column 25 and 26, the sourceurl columns.
As the problem disapears when I specify unique names using AS in the FROM clauses my guess is that hib iterates the column names and not the column index, i.e. treating the columns in "FROM foo.a, bar.b" as the value from foo.a in both cases.
Closing. Feel free to attach a test case, etc. and I'll reopen.