Page 1 of 1

Error during nHibernate configuration on .net core 3.0

Posted: Sun 15 Dec 2019 15:12
by andection
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?

Re: Error during nHibernate configuration on .net core 3.0

Posted: Thu 26 Dec 2019 20:34
by Shalex
Please send us a test project for reproducing the issue.

Re: Error during nHibernate configuration on .net core 3.0

Posted: Fri 27 Dec 2019 08:10
by Shalex
We have reproduced the issue and are investigating it. We will notify you about the result.

Re: Error during nHibernate configuration on .net core 3.0

Posted: Sun 23 Feb 2020 12:50
by andection
Last release fixed the issue. Thanks!

Re: Error during nHibernate configuration on .net core 3.0

Posted: Mon 02 Mar 2020 13:57
by Shalex
The bug with initializing NHibernate configuration on .NET Standard 2.0 is fixed in dotConnect for MySQL v8.17.1583: viewtopic.php?f=2&t=39890.

Re: Error during nHibernate configuration on .net core 3.0

Posted: Sat 04 Apr 2020 13:42
by Shalex
Devart NHibernate Model is supported in .NET Standard / .NET Core projects in Entity Developer v6.7: viewtopic.php?f=32&t=40473.