Merge failed when calling session.update(dto)

Any one can highlight when we get
merge failed : Unknown entity: mypackage.myModel$$EnhancerByCGLIB$$f280b5b7

I am trying to update myModel object with session.update(dto);

First of all, you will have to provide some details. Which Hibernate version are you using? How many persistence units do you have? Did this work before? Please share the code that you are executing.

Hi Beikov,

  1. Hibernate version : 5.4.31 FInal
  2. I have only one persistence units
  3. We are migrating Hibernate from OJB. So this is the first time we are trying to persist this model in Hibernate

Please share the code you are executing. Chances are, the way you are constructing objects is the issue. How do you create this dto object that you are passing to session.update()?