Hello,
Is it possibly to map an association across databases? I have one database that contains Users and Roles, each User is assigned one or more Roles. All of that works fine.
I have another database that defines resources. We have a ProtectedResource class that contains a Resource, and a Role that can access it. Is it possible to have Hibernate read the ProtectedResource from a database, and populate the Role property in ProtectedResource with an object from a different database?
Is it a completely horrible design to have a table in one database reference a PK from a table in a different database? Would it be better for the ProtectedResource table to reference business data for the Role (ie, the role name) instead of the PK, and manually look up the Role when the ProtectedResource object is created?
Thanks for any help!
Kelly
|