mglicks wrote:
This is the case where the product has already been created, and yes I do use assign generator for the product domain object.
What I am trying to do is create the OrderLineItem using an existing product that a user has selected via a GUI. The id I set gets passed to me and I use that one when associating the product to the OrderLineItem
If you want to add an OrderLineItem to an existing Product and assign it to the new OLI. You can't just create a dummy Product with the same key.
From Hibernate Reference doc - section 6.1.7
"A version or timestamp property should never be null for a detached instance, so Hibernate will detect any instance with a null version or timestamp as transient, no matter what other
unsaved-value strategies are specified...."