[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6886) Apply {h-schema} place holder in <database-object> SQL

Cliff Evans (JIRA) noreply at atlassian.com
Fri Dec 9 07:10:21 EST 2011


Apply {h-schema} place holder in <database-object> SQL
------------------------------------------------------

                 Key: HHH-6886
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6886
             Project: Hibernate Core
          Issue Type: Improvement
            Reporter: Cliff Evans


It is currently possible to embed {h-schema} in sql defined in <sql-query> tags and have the place holder be replaced by the value of the default_schema property.  It would make sense to have exactly the same behaviour for <database-object> create & drop clauses.

A use case for this is creating an index on a table that's in the schema (using H2 in my case) defined by default_schema.  I currently have to hardcode the schema name into the create & drop statements which will obviously break if the default_schema property is changed.

e.g.

  <database-object>
    <create>
      create unique index ak1_indexname on {h-schema}tablename(field1, field2)
    </create>
    <drop>
      drop index ak1_indexname
    </drop>
  </database-object>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list