We're updating the issue view to help you get more done. 

Rewrite casting using CGLIB

Description

I discussed here http://forum.hibernate.org/viewtopic.php?t=959027 how we can ensure that proxies do not throw ClassCastExceptions when casting is expected to work.

Currently users have to invoke Hibernate-specific code to make this work, whereas if we handled this using CGLIB the resulting code would be more portable across different frameworks. One of the stated goals of Hibernate is that it should be as non-intrusive as possible in user code. In my view, this is a good candidate.

Environment

None

Status

Assignee

Unassigned

Reporter

Koda Janh

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major