diff --git a/src/NServiceBus.NHibernate/SagaPersisters/SagaModelMapper.cs b/src/NServiceBus.NHibernate/SagaPersisters/SagaModelMapper.cs index 1f354a350..038d216aa 100644 --- a/src/NServiceBus.NHibernate/SagaPersisters/SagaModelMapper.cs +++ b/src/NServiceBus.NHibernate/SagaPersisters/SagaModelMapper.cs @@ -67,7 +67,15 @@ public static List AddMappings(Configuration configuration, SagaMetadata idx.AddColumns(foreignKey.ColumnIterator); idx.Name = "IDX" + foreignKey.Name.Substring(2); idx.Table = table; - table.AddIndex(idx); + + try + { + table.AddIndex(idx); + } + catch (MappingException e) + { + throw new Exception("Failed to add index! Are your sagas sharing types?", e); + } } }