In org.hibernate.type.EntityType possible situations when created instance of the superclass, while instance of the subclass needed. It happens when replace method called on the instance of a subclass, but association target is superclass and instance is not cached. Pull request with test case illustrating one of such situations (when object gets to cache via lazy not cascading association) and containing bug fix following.
|