c# - Error executing multi criteria, Unknown column - Mono + NHibernate + MySQL -
running asp.net mvc application under apache + mod_mono + mysql error:
mysql.data.mysqlclient.mysqlexception unknown column 'this_.date_created' in 'field list' exception:
nhibernate.hibernateexception: error executing multi criteria : [select count(*) y0_ tag this_; select this_.id id4_0_, this_.name name4_0_, this_.description descript3_4_0_, this_.date_created date4_4_0_, this_.total_peruns total5_4_0_, this_.user_id user6_4_0_ tag this_ order this_.total_peruns desc limit ?p0; ] ---> mysql.data.mysqlclient.mysqlexception: unknown column 'this_.date_created' in 'field list' @ mysql.data.mysqlclient.mysqlstream.readpacket () [0x00000] in <filename unknown>:0 @ mysql.data.mysqlclient.nativedriver.readresult () [0x00000] in <filename unknown>:0 --- end of inner exception stack trace --- @ nhibernate.impl.multicriteriaimpl.getresultsfromdatabase (system.collections.ilist) <0x0097f> @ nhibernate.impl.multicriteriaimpl.dolist () <0x0003f> @ nhibernate.impl.multicriteriaimpl.listignorequerycache () <0x0000f> @ nhibernate.impl.multicriteriaimpl.list () <0x00297> @ nhibernate.impl.futurecriteriabatch.getresultsfrom (nhibernate.imulticriteria) <0x0001d> @ nhibernate.impl.futurebatch`2<nhibernate.icriteria, nhibernate.imulticriteria>.getresults () <0x00110> @ nhibernate.impl.futurebatch`2<nhibernate.icriteria, nhibernate.imulticriteria>.get_results () <0x0001f> @ nhibernate.impl.futurebatch`2<nhibernate.icriteria, nhibernate.imulticriteria>.getcurrentresult<perun.domain.model.entities.tag> (int) <0x00027> @ nhibernate.impl.futurebatch`2/<>c__displayclass4`1<nhibernate.icriteria, nhibernate.imulticriteria, perun.domain.model.entities.tag>.<getenumerator>b__3 () <0x00043> ... the date_created column exists in table.
the same application works on windows dev machine windows version of mysql.
mysql linux: 5.5.34 mysql windows: 5.6.12 nhibernate version: 3.1.0.4000 sql generated executes correctly in database (?p0 = 10):
select this_.id id4_0_, this_.name name4_0_, this_.description descript3_4_0_, this_.date_created date4_4_0_, this_.total_peruns total5_4_0_, this_.user_id user6_4_0_ tag this_ order this_.total_peruns desc limit ?p0; what causing problem?
this things happen everyone. nothing wrong environments, libraries or mysql. connection string pointing old version of database. web.config
<connectionstrings> <add name="localhost" connectionstring="server=name;database=old_database_version;user id=user;password=pass;"/> </connectionstrings> thank efforts , time.
Comments
Post a Comment