Hi there! I have a table called available_products in schema X with only one column : product_id which is a FK to a table called products on schema Y.
Since the only column on this table is the PK + FK (Please, I wasn't the DBA for the project).
What's the best choice to map this? I found two solutions, none seems to work:
Have a property Product on the availableProducts class and map as a one-to-one association to Product (did not work cuz it would be mapped to the same column as the id, and it complains about duplicate column)
Have only a composite key on availableProducts which is a Product it self.
Any ideas???
|