This took a bit to figure out so I thought I would share.
See that # - if you're using toplink you want the # for a named substitution BUT if you're using hibernate you want a :
and somefield is a string in the above - you don't need to wrap it in quotes. toplink at least will figure it out.
sheesh....that su...ed...and yes i know, i know, blah, blah, blah....don't use native queries...more blahs...
hope the above is helpful....
posted 5 years ago
Parameters are meant to be indexed in JPA native SQL queries using the "?" marker.