This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
it forces me to use insertable as false and updateable as false for one of them but that does not help me since it does not store the relationship between the products. I am not sure how to get over this and continue.
if you have some ideas please help me out, also i am willing to change my DB design if there is a better one but i cant think of any.
as far as I know the attribute name of the annotation JoinColumn is the name of the column in this table, not in the referenced one (which would be referencedColumnName, but can be omitted if the pk column is referenced).
In your case this would mean that you're trying to have two columns named productId in your database table productrelationship.