[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5333) Dynamically setting schema name for native queries in hbm file
Niraj Gadgilwar (JIRA)
noreply at atlassian.com
Wed Jun 23 07:19:09 EDT 2010
Dynamically setting schema name for native queries in hbm file
--------------------------------------------------------------
Key: HHH-5333
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5333
Project: Hibernate Core
Issue Type: Task
Components: query-sql
Affects Versions: 3.3.2, 3.3.0.SP1, 3.2.2
Reporter: Niraj Gadgilwar
Hi ,
inside my hibernate.cfg.xml I am mentioning
hibernate.default_schema as schema name (say "testSchema") and it is working with named queries and HQL as expected.But when I am using a native sql query
<sql-query name="myQuery">
<return-scalar column="NAME" type="java.lang.String"/>
<return-scalar column="SURNAME" type="java.lang.String"/>
SELECT NAME,SURNAME FROM ${hibernate.default_schema}.TBEMPLOYEE
</sql-query>
In that case the schema name(i.e. testSchema)is not getting appended to the table names.
I tried this for Hibernate version 3.3.0 and 3.3.2. But it is not working.
Can anybody provide me the correct implementation ? Do anyone know correct syntax?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list