简体   繁体   中英

Hibernate entity from multiple schemas

I am looking for a way to create an hibernate entity, which will be built by data from several schemas. Most of the properties are on a single table on the first schema. One property represents an ID of a row, which is on a table on the second schema.

Is it possible to do such thing?

This will be possible.

You will need to make sure the second schema GRANTs access to the first one for the relevant table and then you will be able to use the @SecondaryTables annotation described here as if it were in the first schema.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM