The only logical explanation is that your ObjectContext is "dirty" - it contains other uncommitted objects in addition to what is shown here. This can happen for a variety of reasons, 2 most common being:
(1) ObjectContext scope is too wide and changes to the context are originating from some other place in the app.
(2) changes originating from callbacks/listeners during commit.
Some hints on scoping of ObjectContexts:
- Do not share ObjectContexts in a concurrent environment if the contexts are expected to handle writes (as opposed to just reads; read-only contexts can be shared).
- Ideal scope for an ObjectContext that handles writes is a single method or a single request. This guarantees that nobody else would access it concurrently.
- Often a context would have a longer scope though. E.g. it may be saved in a session in a webapp, and may carry uncommitted changes between requests. In this situation still consider reducing its scope. E.g. create multiple such contexts in a session, each attached to a given page. So that uncommitted changes in one place do not surprise you when you commit something else in another place.