NHibernate.ReplicationMode.Overwrite for migration doesn't populate junction tables

I am trying to migrate all content from a SQLite database to a SQL Server instance using Nhibernate.

I’m using a StatelessSession with the sqlDB and calling CreateCriteria to return a List of all my entities.

Then I’m using a an IDataSession with the SQL server instance and iterating over my list making the call -
sqlserverHibernateSession.GetSession().Replicate(resources[i], NHibernate.ReplicationMode.Overwrite);

This works well to migrate all the resources from sqlite to sql server, except for the junction table content for entities that have many to many relationships. The tables are created, but are empty when I’m finished with the migration.

I suspect that I might be missing a step, or perhaps that my mappings are missing a configuration.

Subsequently, I am using native SQL to query all the junction tables and insert the content to my sql server instance.

Is there a more clean solution using nhibernate?

This forum is for Hibernate, the Java implementation. For questions about NHibernate, please use the forums as listed on the https://nhibernate.info website like e.g. https://groups.google.com/g/nhusers