I have WPF application with simple logic: we have Tasks and Projects entities. Something like this:
On application_start domain and session are created. And on first select query with prefetch (example of code at the end of message) I don't have any problem. Then, I create new task, select project for it, and call
Everything is fine: I have new record in database, and I have
After that I call code with prefetch again. It selects all tasks (and already added one too). But: there is NO Prj in task, which I've already added.
And trying to access this field throws NullReferenceException. There is Project.Id in database for this record. When I restart application (rebuild domain) everything works fine. It only happens with new added records. Example of code:
Help me, please. Maybe, I don't understand something, but I'm ready to read and learn this :) |
Initially, it looks weird, i.e. probably, that's a result of some bug. Few questions to help us to reproduce it:
|