NHibernate.StaleStateException : Unexpected row count: 0; expected: 1

后端 未结 3 909
醉梦人生
醉梦人生 2021-01-02 04:54

Hl Guys,

I am busy writing a backend administrative program for a system that exists. I have selected NHibernate for my data access solution and am fairly new to it.

相关标签:
3条回答
  • Got the same error message but it was triggered by a delete. The simple reason was the entry had been deleted before already.

    0 讨论(0)
  • 2021-01-02 05:43

    For anyone having problems with inserts with AutoNumber / AutoIncrement for MySQL use the mapping. I found that the .Identity can be temperamental

    Id(x => x.Id).GeneratedBy.Increment();
    
    0 讨论(0)
  • 2021-01-02 05:46

    I'm pretty sure you'll need to add a <version/> property to your MeetingAdministrator class to have this working propertly. See this article for further discussion.

    0 讨论(0)
提交回复
热议问题