Catalog and schema replacement in <subselect> / @Subselect

Description

Allow use of {h-catalog}, {h-schema} and {h-domain} placeholder markers (from native-query support) in <subselect/> and @Subselect mappings. E.g.

Hibernate will replace {h-catalog} with the name of the default catalog - e.g., select id, name from default_catalog.table_in_catalog

Here, we will also allow @Table to be used to override the default-catalog and default-schema for the subselect. E.g.

And now we’d get - select id, name from local_catalog.table_in_catalog

Activity

Show:

Steve EbersoleDecember 18, 2021 at 12:09 PM

I’ll take a look at the PR relative to 6.0 code after the holidays

Former userJanuary 2, 2019 at 11:06 PM

, since this is an improvement, does it need to wait for Hibernate 6?

Alexey ChumakOctober 15, 2018 at 5:10 PM
Edited

Pull request https://github.com/hibernate/hibernate-orm/pull/2543 does the same thing as proposed in the description , but reuses the same code from other places where placeholders are supported

Alexey ChumakSeptember 26, 2018 at 6:28 AM

qianlong morelDecember 16, 2013 at 1:48 PM

I have searched for a long time, hope it can be resolved soon.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created January 9, 2013 at 9:08 AM
Updated November 23, 2024 at 1:42 AM
Resolved November 21, 2024 at 12:54 PM