any clue why that would cause the TooManyRowsAffectedException?
On Wed, Feb 24, 2010 at 5:05 PM, fknebels <[email protected]> wrote: > Check out your mappings. If you've mapped a nullable db column to a > non nullable type like Int32, it will place a value in the object. > > Fabio has mention the NHibernate Ghostbuster tool as a way to debug > these situations. > > Here a link to the tool: > > http://jfromaniello.blogspot.com/2010/02/nhibernate-ghostbuster-version-11.html > > -Fran > > On Feb 23, 10:50 pm, Keith Nicholas <[email protected]> wrote: >> I can't seem to work out whats happening.... >> >> I've narrowed down the code to :- >> >> start a transaction >> Get an object from the database >> commit the transaction >> >> and I get "NHibernate.AdoNet.TooManyRowsAffectedException: Unexpected >> row count: 2; expected: 1" >> >> Looking in sql profiler it seems to be try to update the object the >> was retrieved....I'm not quite sure why its attempting this? >> presumably in the process of getting the object its made a change? >> perhaps due to an invalid value in the database (its a legacy >> database) >> >> Any ideas? >> >> Any ideas how to debug such a problem? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
