Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.1.6
Oracle 9i
Just starting to get my first hibernate app working and have managed a simple CRUD on a table, hoorah.
My problem is with my next mapping. I have a table that has a foreign key and I wanted to create a many to one mapping to the table that provides the key. In this case however, the foreign key is generated by an Oracle sequence and can come from one of 2 tables.
Eg:
tClient
Client_ID (PK)
Portfolio_ID (
FK)
Description
etc etc
Portfolio_ID is the FK that can come from either of these 2 tables
tPortfolio
Portfolio_ID (PK)
Descr
or
tUserPortfolio
Portfolio_ID (PK)
Descr
This construct allows me to have the concept of one super set of portfolios, tPortfolio from an external source and tUserPortfolio created by users
Any ideas please on how or even if a mapping can be created that can do this
Thanks