Quote:
You have two solutions which I'll not post the code for you.
1. You can enable the auto quote on table/column names, editing the Fluent Connection;
2. You can escpae the column name which is using a reserved name with "`" on the mapping.
Good luck.
Why do not you want help
All Problem
Quote:
n)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty
, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplemento
r session)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields
, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventList ener.PerformExecutions(I
EventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener .OnFlush(FlushEvent even
t)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at DB.HibernateDataRow`1.SaveOrUpdate(T obj, ISession pSession) in D:\Progrem
\B-oN\work2019\zfserver v2.5517\DB\Hibernate Data Row.cs:line 34
08-01 00:12:42 - User [1] has successfully logged into Dark(192.168.1.3:5816).
NHibernate.Exceptions.GenericADOException: could not update: [DB.Entities.DbAcco
unt#3808][SQL: UPDATE account SET name = ?, password = ?, vip = ?, lock = ?, typ
e = ?, last_login = ?, mac_addr = ?, lock_expire = ? WHERE id = ?] ---> MySql.Da
ta.MySqlClient.MySqlException: You have an error in your SQL syntax; check the m
anual that corresponds to your MySQL server version for the right syntax to use
near 'lock = 0, type = 2, last_login = 1564625563, mac_addr = '000000000000', lo
ck_exp' at line 1
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int3 2& affectedRow, Int64& i
nsertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult( )
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader( CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuer y()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery( IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IE xpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty
, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplemento
r session)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields
, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventList ener.PerformExecutions(I
EventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener .OnFlush(FlushEvent even
t)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at DB.HibernateDataRow`1.SaveOrUpdate(T obj, ISession pSession) in D:\Progrem
\B-oN\work2019\zfserver v2.5517\DB\Hibernate Data Row.cs:line 34
NHibernate.Exceptions.GenericADOException: could not update: [DB.Entities.DbAcco
unt#3808][SQL: UPDATE account SET name = ?, password = ?, vip = ?, lock = ?, typ
e = ?, last_login = ?, mac_addr = ?, lock_expire = ? WHERE id = ?] ---> MySql.Da
ta.MySqlClient.MySqlException: You have an error in your SQL syntax; check the m
anual that corresponds to your MySQL server version for the right syntax to use
near 'lock = 0, type = 2, last_login = 0, mac_addr = '78ACC0B87B46', lock_expire
= 0 W' at line 1
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int3 2& affectedRow, Int64& i
nsertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult( )
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader( CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuer y()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery( IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IE xpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty
, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplemento
r session)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields
, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventList ener.PerformExecutions(I
EventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener .OnFlush(FlushEvent even
t)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at DB.HibernateDataRow`1.SaveOrUpdate(T obj, ISession pSession) in D:\Progrem
\B-oN\work2019\zfserver v2.5517\DB\Hibernate Data Row.cs:line 34
08-01 00:12:58 - User [2] has successfully logged into Dark(192.168.1.3:5816).
NHibernate.Exceptions.GenericADOException: could not update: [DB.Entities.DbAcco
unt#3809][SQL: UPDATE account SET name = ?, password = ?, vip = ?, lock = ?, typ
e = ?, last_login = ?, mac_addr = ?, lock_expire = ? WHERE id = ?] ---> MySql.Da
ta.MySqlClient.MySqlException: You have an error in your SQL syntax; check the m
anual that corresponds to your MySQL server version for the right syntax to use
near 'lock = 0, type = 2, last_login = 1564625578, mac_addr = '000000000000', lo
ck_exp' at line 1
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int3 2& affectedRow, Int64& i
nsertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult( )
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader( CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuer y()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery( IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IE xpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty
, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplemento
r session)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields
, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventList ener.PerformExecutions(I
EventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener .OnFlush(FlushEvent even
t)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at DB.HibernateDataRow`1.SaveOrUpdate(T obj, ISession pSession) in D:\Progrem
\B-oN\work2019\zfserver v2.5517\DB\Hibernate Data Row.cs:line 34
NHibernate.Exceptions.GenericADOException: could not update: [DB.Entities.DbAcco
unt#3809][SQL: UPDATE account SET name = ?, password = ?, vip = ?, lock = ?, typ
e = ?, last_login = ?, mac_addr = ?, lock_expire = ? WHERE id = ?] ---> MySql.Da
ta.MySqlClient.MySqlException: You have an error in your SQL syntax; check the m
anual that corresponds to your MySQL server version for the right syntax to use
near 'lock = 0, type = 2, last_login = 0, mac_addr = '78ACC0B87B46', lock_expire
= 0 W' at line 1
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int3 2& affectedRow, Int64& i
nsertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult( )
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader( CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuer y()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery( IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IE xpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty
, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplemento
r session)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields
, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventList ener.PerformExecutions(I
EventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener .OnFlush(FlushEvent even
t)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at DB.HibernateDataRow`1.SaveOrUpdate(T obj, ISession pSession) in D:\Progrem
\B-oN\work2019\zfserver v2.5517\DB\Hibernate Data Row.cs:line 34
08-01 00:13:05 - User [1] has successfully logged into Dark(192.168.1.3:5816).
NHibernate.Exceptions.GenericADOException: could not update: [DB.Entities.DbAcco
unt#3808][SQL: UPDATE account SET name = ?, password = ?, vip = ?, lock = ?, typ
e = ?, last_login = ?, mac_addr = ?, lock_expire = ? WHERE id = ?] ---> MySql.Da
ta.MySqlClient.MySqlException: You have an error in your SQL syntax; check the m
anual that corresponds to your MySQL server version for the right syntax to use
near 'lock = 0, type = 2, last_login = 1564625586, mac_addr = '000000000000', lo
ck_exp' at line 1
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int3 2& affectedRow, Int64& i
nsertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult( )
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader( CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuer y()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery( IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IE xpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty
, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplemento
r session)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields
, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventList ener.PerformExecutions(I
EventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener .OnFlush(FlushEvent even
t)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at DB.HibernateDataRow`1.SaveOrUpdate(T obj, ISession pSession) in D:\Progrem
\B-oN\work2019\zfserver v2.5517\DB\Hibernate Data Row.cs:line 34
NHibernate.Exceptions.GenericADOException: could not update: [DB.Entities.DbAcco
unt#3808][SQL: UPDATE account SET name = ?, password = ?, vip = ?, lock = ?, typ
e = ?, last_login = ?, mac_addr = ?, lock_expire = ? WHERE id = ?] ---> MySql.Da
ta.MySqlClient.MySqlException: You have an error in your SQL syntax; check the m
anual that corresponds to your MySQL server version for the right syntax to use
near 'lock = 0, type = 2, last_login = 0, mac_addr = '78ACC0B87B46', lock_expire
= 0 W' at line 1
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int3 2& affectedRow, Int64& i
nsertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult( )
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader( CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuer y()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery( IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IE xpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32
j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor sessio
n)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty
, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplemento
r session)
at NHibernate.Persister.Entity.AbstractEntityPersiste r.Update(Object id, Obje
ct[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields
, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
at NHibernate.Action.EntityUpdateAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventList ener.PerformExecutions(I
EventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener .OnFlush(FlushEvent even
t)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoTransaction.Commit()
at DB.HibernateDataRow`1.SaveOrUpdate(T obj, ISession pSession) in D:\Progrem
\B-oN\work2019\zfserver v2.5517\DB\Hibernate Data Row.cs:line 34