[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5333) Dynamically setting schema name for native queries in hbm file

Strong Liu (JIRA) noreply at atlassian.com
Thu Jun 24 02:41:09 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37553#action_37553 ] 

Strong Liu commented on HHH-5333:
---------------------------------

the fix version in HHH-2576 means that issue was resolved in Branch_3_3 and 3.5.0-beta3, and according Branch_3_3 is not maintains anymore, so, i'd suggest you try the latest 3.5.3 release.
it does fixed in 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