New Posts New Posts RSS Feed: Store update, insert, or delete statement affected
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Store update, insert, or delete statement affected

 Post Reply Post Reply
Author
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Topic: Store update, insert, or delete statement affected
    Posted: 09-Nov-2010 at 3:50pm
I am getting the following error when I save changes to one specfic entity type: Each entity creates an auditvalue entity. But when one specific entity type does it throws the error:
 
Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries.
Back to Top
mikewishart View Drop Down
Groupie
Groupie
Avatar

Joined: 26-Feb-2010
Location: Reno, NV
Posts: 49
Post Options Post Options   Quote mikewishart Quote  Post ReplyReply Direct Link To This Post Posted: 10-Nov-2010 at 7:21am
I had this as well.  It turned out I was trying to modify the primary key of an entity which you can't do.  You have to delete and re-add the entity with the new key.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 10-Nov-2010 at 7:23am
Thank you that actually helps. The audit entity that is created creates a key based on the key structure of the entity being audited. And that would change in this case only. I will look into that.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down