[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-5333) Dynamically setting schema name for native queries in hbm file
Niraj Gadgilwar (JIRA)
noreply at atlassian.com
Thu Jun 24 03:05:10 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37554#action_37554 ]
Niraj Gadgilwar edited comment on HHH-5333 at 6/24/10 2:03 AM:
---------------------------------------------------------------
I gone through SQLQueryParser.java class of v 3.3.0, 3.3.1 and 3.3.2.
But I didn't find the changes related to schema which was mentioned in patch HHH-2576-R5.patch.
Am I downloading wrong jars of Hibernate?
I am using following link to download the jars.
https://olex.openlogic.com/packages/hibernate/3.3.2.GA#
was (Author: ngadgilwar):
I gone through SQLQueryParser.java class of v 3.3.0, 3.3.1 and 3.3.2.
But I didn't find the changes related to schema which was mentioned in patch HHH-2576-R5.patch.
Am I using downloading wrong jars of Hibernate.
I am using following link to download the jars.
https://olex.openlogic.com/packages/hibernate/3.3.2.GA#
> 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: Bug
> Components: query-sql
> Affects Versions: 3.2.2, 3.3.0.SP1, 3.3.2
> Reporter: Niraj Gadgilwar
> Assignee: Strong Liu
>
> 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