Proxy initialization should be fail-fast when accidentially initializing from event listeners or interceptor

Description

Proxy initialization done in event listeners (at least post-update) with an entity that has a mapped collection seems to result in

at flush time.

By googling up problems like the above assertion failure seems that other people than me have spent quite a time searching for the origin of this problem; for me it was using a toString() of an uninitialized proxy.

Environment

Hibernate 3.2.2

Assignee

Unassigned

Reporter

Joonas Koivunen

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