| 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. |