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

ForeignGenerator Throws ClassCastException When Using StatelessSession

Description

When using a StatelessSession, an entity that uses @MapsId triggers the ForeignGenerator to pull an entity ID from the @OneToOne entity to which @MapsId points.

ForeignGenerator tries to cast org.hibernate.internal.StatelessSessionImpl to org.hibernate.Session at line 84. This fails because StatelessSessionImpl does not implement or inherit an implementation of org.hibernate.Session.

Environment

None

Status

Assignee

Unassigned

Reporter

Clinton Bush

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.3.7

Priority

Critical