One of the laws of software development is “A better way of finding bugs than testing is to release” and sure enough, that happened. I rolled a release of the ORM yesterday, and no sooner than I did, someone hit a bug with the new connection pooling in the Compact Framework. It turns out that the SqlCeConnection exposes a Disposed event in the CF, but that event never fires. The connection pooling implementation relied on that event to know when to remove connections from the pool, and voila – a bug is born. Is it a bug in the ORM, or a bug in the SqlCeConnection? I’d say that’s debatable both ways, but since I only have control over one of them I made the fix where I could.
There’s a workaround checked into the source tree over on Codeplex (change set 107904). This fix is *not* yet rolled into a release package (sure would be nice if that were automated).