This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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.