Любые идеи о том, почему я получаю эту ошибку:
nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [Product#6]
Из этого кода:
def save = {
def productInstance = new Product(params)
if(!productInstance.hasErrors() && productInstance.save()) {
flash.message = "Product ${productInstance.id} created"
redirect(action:show,id:productInstance.id)
}
else {
render(view:'create',model:[productInstance:productInstance])
}
}