parameter « Schema « JPA Q&A

1. Hibernate schema parameter doesn't work in @SequenceGenerator annotation

I have the following code:

@Table(name = "my_table", schema = "my_schema")
@SequenceGenerator(name = "my_table_id_seq", sequenceName = "my_table_id_seq", 

2. Schema name as query parameter?

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: ...

3. filter using schema name as parameter