Error during nHibernate configuration on .net core 3.0

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
andection
Posts: 2
Joined: Sun 15 Dec 2019 12:52

Error during nHibernate configuration on .net core 3.0

Post by andection » Sun 15 Dec 2019 15:12

Hi.

We are converting our application from .net framework 4.7.1 to .net core. We got an error on building session factory.
Requested collection not defined

Code: Select all

 
   at   .     (DbConnection ,   , String , String[] )
   at  .     (DbConnectionBase , String , String[] )
   at Devart.Common.DbConnectionBase.GetSchema(String collectionName, String[] restrictionValues)
   at Devart.Common.DbConnectionBase.GetSchema(String collectionName)
   at NHibernate.Dialect.Schema.AbstractDataBaseSchema.GetReservedWords()
   at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper)
   at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.UpdateDialectKeywords(Dialect dialect, IConnectionHelper connectionHelper)
   at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactoryImplementor sessionFactory)
   at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners)
   at NHibernate.Cfg.Configuration.BuildSessionFactory()
   at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
Configuration:

Code: Select all

            var sessionFactory = Fluently
                .Configure()
                .Database(()=> MySQLConfiguration.Standard.Driver<DotConnectMySqlDriver>().Dialect<MySQL57Dialect>().ConnectionString(ConnectionString))
                .Mappings(m =>
                {
                    m.FluentMappings.AddFromAssemblyOf<LdapDomainMap>().Conventions.Add(new UtcNoMsConvention());
                })
                .CurrentSessionContext("call")
                .ExposeConfiguration(cfg => { })
                .BuildSessionFactory();
Packages
1. Devart.Data.MySql 8.15.1519
2. Nhibernate 5.2.6
3. FluntNhibernate 2.1.2
Database: MySql
target framework: .net core 3.0

Almost same configuration works with MySql.Data and same configuration works on .net framework 4.7.1.

Could you help me to fix it. please?

Shalex
Site Admin
Posts: 9029
Joined: Thu 14 Aug 2008 12:44

Re: Error during nHibernate configuration on .net core 3.0

Post by Shalex » Thu 26 Dec 2019 20:34

Please send us a test project for reproducing the issue.

Shalex
Site Admin
Posts: 9029
Joined: Thu 14 Aug 2008 12:44

Re: Error during nHibernate configuration on .net core 3.0

Post by Shalex » Fri 27 Dec 2019 08:10

We have reproduced the issue and are investigating it. We will notify you about the result.

andection
Posts: 2
Joined: Sun 15 Dec 2019 12:52

Re: Error during nHibernate configuration on .net core 3.0

Post by andection » Sun 23 Feb 2020 12:50

Last release fixed the issue. Thanks!

Post Reply