Nhibernate transaction issue when moving to mysql from mssql -


i using nhibernate mssql (2008) , worked great. had web app bound session per request , wrapped every unit of work within transaction. transactions injected via aop , custom attribute, required attribute wrapped in transaction either ended commit or rollback.

again clarify working fine in mssql , using nhibernate profiler can see transactions occurring expected.

now have added support mysql (5.1) (as 1 environment uses mysql db), have setup tables innodb , table structures identical, bit baffled why following error:

row updated or deleted transaction (or unsaved-value mapping incorrect): [somerandomentity#1]could not synchronize database state session 

checking on nhibernate profiler, beginning transaction, firing update call bombing out error, whereas should committing @ point.

if helps sql being fired in update (names changed):

update      some_table set some_column_1 = 1230697028 /* ?p0 */,      some_column_2 = '2011-07-21t10:58:59.00' /* ?p1 */  some_column_3 = 1 /* ?p2 */ 

it worth noting not using isolation level on transactions, wasnt sure 1 best setup , mssql didnt complain when didnt set it.

has seen issues before, show stopper @ moment :(

=== edit ===

incase helps here connection string:

<connectionstrings>     <add name="nhibernateconnection" connectionstring="server=localhost;database=xxxxx;uid=root;" providername="system.data.sqlclient"/>   </connectionstrings> 

it seems problem down wonky column not inserting somewhere else, stopping update. although error not clear underlying problem was.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -