org.hibernate.Interceptor.instantiate(String entityName, EntityMode entityMode, Serializable id) does not have any way of leveraging the EntityPersister to set the identifier

Description

Would it be better to past the EntityPersister through rather than just the entityName to the Interceptor.instantiate(String entityName, EntityMode entityMode, Serializable id) method so that the implementation could set the identifier using the EntityPersister?

Currently I have used the work around as described here (https://forum.hibernate.org/viewtopic.php?f=1&t=997310&p=2437806#p2437806) but I suspect this might not be correct for all situations.

Environment

None

Activity

Show:
Gail Badner
December 14, 2010, 1:59 AM

Please use the forum for help.

Chris Webb
December 14, 2010, 12:20 PM

Gail, with all due respect I raised this because I thought there was an error in the logic and not because I didn't understand and needed help. I think you've rejected this prematurely. At the very least I would have expected an explanation of why a code change was not required and not simply a redirect to the user forum. Best regards, Chris

Steve Ebersole
March 21, 2011, 7:08 PM

Bulk closing stale resolved issues

Assignee

Gail Badner

Reporter

Chris Webb

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure