Generate method in class NHibernate.Id.ForeignGenerator fails when working with stateless sessions
Description
When using stateless sessions the Generate method in class NHibernate.Id.ForeignGenerator fail because there is an explicit cast from ISessionImplementor to ISession, so when working with stateless sessions, the cast fail because StatelessSessionImplementor implements IStatelessSession instead of ISession.
When using stateless sessions the Generate method in class NHibernate.Id.ForeignGenerator fail because there is an explicit cast from ISessionImplementor to ISession, so when working with stateless sessions, the cast fail because StatelessSessionImplementor implements IStatelessSession instead of ISession.
Related Hibernate issue: https://hibernate.atlassian.net/browse/HHH-968