[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2576) Allow native-sql to have placeholders for default schema and catalog
Max Rydahl Andersen (JIRA)
noreply at atlassian.com
Tue Nov 3 11:11:53 EST 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34419#action_34419 ]
Max Rydahl Andersen commented on HHH-2576:
------------------------------------------
Nice to see progress on this one (me being lazy not doing it sooner ;)
I tend to agree with Steve on not seeing the need for free access to hibernate properties.
Sure, it could be "cool" to do - but it also just seem to be a very wide and open door
risking all kind of issues depending on what the values actually are; accidentally sql injection
etc.
Without a good use case I see more danger in that than value.
Access to functions sound good, but not sure a basic {h-fn xxx} is enough - doesn't it need to receive parameters to expand/work correctly ?
Leaving the initial feature last, then {h-catalog.} is needed too; or at least some {h-catalog-schema.} option that would generate the fully qualified name needed databases that need both.
> Allow native-sql to have placeholders for default schema and catalog
> --------------------------------------------------------------------
>
> Key: HHH-2576
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2576
> Project: Hibernate Core
> Issue Type: Improvement
> Components: query-sql
> Affects Versions: 3.2.3
> Reporter: Max Rydahl Andersen
> Attachments: HHH-2576-01.patch
>
>
> we shold consider allowing something like:
> <sql-query name="queryName" callable="true">
> { call ${default_schema}.storedProcName() }
> </sql-query>
> similar for normal SQL queries too.
> <sql-query name="queryName">
> select * from ${default_schema}.CUSTOMER x where ...
> </sql-query>
> Maybe ${catalogschema} should be allowed to which would be the full prefix needed dependent on the dialect and would free one from having both catalog and schema + poper seperators in there.
--
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