So I've been getting this feeling that I should turn off lazy loading, for two reasons:
- queries become non-atomic, so could result in concurrency errors.
- me or another programmer could end up causing a huge performance impediment.
Of course, both of these problems can be avoided as long as we're careful, but it seems a bit of an unnecessary risk in projects where performance is somewhat important.
As a side note, I found it weird that 1-* relationship properties become null
rather than throwing an exception when you access them with lazy loading off. I want to go back and do everything in single queries, but I'm worried that I might overlook a bug where I'm interpreting a not-yet-loaded 0-* relationship as being null
.
Thoughts?