Problem FluentNhibernate and Informix Database

9 views
Skip to first unread message

Igor Monteiro

unread,
Mar 2, 2015, 3:10:22 PM3/2/15
to fluent-n...@googlegroups.com
HI , i need to conect in Informix Database, but i received a error message :
"An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail."

there is my code to getfactory:

                        ISessionFactory factory = Fluently.Configure()
                                         .Database(
                               IfxSQLIConfiguration
                              .Informix1000
                              .Provider<NHibernate.Connection.DriverConnectionProvider>()
                              .Driver<NHibernate.Driver.IfxDriver>()
                              .Dialect<NHibernate.Dialect.InformixDialect>()
                              .ConnectionString(c => c.FromConnectionStringWithKey(databaseKey))
                              .ShowSql())
                              .Mappings(x => x.FluentMappings.AddFromAssemblyOf<TvLoginMapping>()
                              .Conventions.AddFromAssemblyOf<CustomTypeConvention>()
                              )
                              .BuildSessionFactory();
                        factories.Add(databaseKey, factory);

and there is my mapping:

    public class TvLoginMapping : ClassMap<TvLogin>
    {
        public TvLoginMapping()
        {
            this.Table("tvlogin");
            this.Id(X => X.u4976_38748);
            this.Map(X => X.cdlogin);
            this.Map(X => X.nrgrafico);
        }
    }



Gleb Chermennov

unread,
Mar 3, 2015, 5:07:53 AM3/3/15
to fluent-n...@googlegroups.com
Ok, so what does inner exception say? I'm not familiar with Informix at all, I'm afraid.

понедельник, 2 марта 2015 г., 23:10:22 UTC+3 пользователь Igor Monteiro написал:
Reply all
Reply to author
Forward
0 new messages