Thursday, March 3, 2011

org.hibernate.TransientObjectException

object references an unsaved transient instance - save the transient instance before flushing

classa.product -> Product


just add
@ManyToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST})

to classa.product attribute


This could happen by mistake, for instance if the product has id = 0...

No comments: