vgiguere wrote:
To answer your question, I am not familiar with Spring yet.
Maybe you could post the code where you retrieve the Product and reassociate it to the session prior to saving it
Are you in a multi-layer environment? Do you reassociate objects to the session when you cross your layers, or do you have the session available on your front end?
Sorry, I was away for a while, just got back.
I discovered the source of the problem. It was that the StockItem's association to Product had "cascade=save-update" instead of 'cascade=none' (i.e., the many-to-one definition in the StockItem mapping). As soon as this was changed to 'none', the problem went away. Still not sure exactly why this should be so, though.