Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated filter-def named exception when having multiple mappings #192

Open
adamdallis opened this issue Nov 13, 2012 · 0 comments
Open

Comments

@adamdallis
Copy link

I have followed the instructions in the link below. It seems to compile xml fine when I have 1 mapping but if I add 2 I get an exception. below find my config the link with code and the exception. If you need anything please contact me.

http://stackoverflow.com/questions/960625/syntax-to-define-a-nhibernate-filter-with-fluent-nhibernate

.Mappings(m => m.FluentMappings.AddFromAssemblyOf())
.Mappings(m => m.FluentMappings.AddFromAssemblyOf())

[MappingException: Duplicated filter-def named: ]
NHibernate.Cfg.Mappings.AddFilterDefinition(FilterDefinition definition) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Mappings.cs:472
NHibernate.Cfg.XmlHbmBinding.MappingRootBinder.AddFilterDefinitions(HbmMapping mappingSchema) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\XmlHbmBinding\MappingRootBinder.cs:75
NHibernate.Cfg.XmlHbmBinding.MappingRootBinder.Bind(HbmMapping mappingSchema) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\XmlHbmBinding\MappingRootBinder.cs:26
NHibernate.Cfg.Configuration.AddDeserializedMapping(HbmMapping mappingDocument, String documentFileName) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:522

[MappingException: Could not compile the mapping document: (XmlDocument)]
NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:342
NHibernate.Cfg.Configuration.AddDeserializedMapping(HbmMapping mappingDocument, String documentFileName) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:530
NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:499
NHibernate.Cfg.Configuration.ProcessMappingsQueue() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:1832
NHibernate.Cfg.Configuration.AddDocumentThroughQueue(NamedXmlDocument document) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:1823
NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader, String name) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:1816
NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:632
NHibernate.Cfg.Configuration.AddDocument(XmlDocument doc, String name) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:483
NHibernate.Cfg.Configuration.AddDocument(XmlDocument doc) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:455
FluentNHibernate.PersistenceModel.Configure(Configuration cfg) in d:\Builds\FluentNH-v1.x-nh3\src\FluentNHibernate\PersistenceModel.cs:283
FluentNHibernate.Cfg.MappingConfiguration.Apply(Configuration cfg) in d:\Builds\FluentNH-v1.x-nh3\src\FluentNHibernate\Cfg\MappingConfiguration.cs:88
FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() in d:\Builds\FluentNH-v1.x-nh3\src\FluentNHibernate\Cfg\FluentConfiguration.cs:249

[FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.

]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant