I am using Hiberate 3.0.
I have a hibernate mapping file with an SQL query along the lines of:
SELECT * from mySchema.myTable
For out project we need to have the schema name as a variable, so I tried:
SELECT * from :schemaName.myTable
and in the Jave code calling:
query.setString("schemaName", "myTable");
but in doing so I get the Exception:
Caused by: java.lang.IllegalArgumentException: Parameter schemaName does not exist as a named parameter in ...
Is what I am wanting to do possible and how would I go about doing it. I did a cursory search of the forums, but I could not find anything of help.
|