nhibernate/nhibernate-core — pull request #132 by dschilling (2012-08-01 22:19:23+00:00)
Title: NH-2033: Unit tests and possible fix to allow QueryOver and Criteria joins on key-many-to-one properties

JIRA issue: https://nhibernate.jira.com/browse/NH-2033

There are a few different unit tests in this pull request:
* Two failing tests, one for `QueryOver` and one for `ICriteria`.
* Two passing tests, one for `LINQ` and one for `HQL`, because apparently they are not affected by this bug (good to know).
* Another passing test, this one using `QueryOver` and a `many-to-one` (not `key-many-to-one`), so that I could step into the debugger and see how it was *supposed* to work.

All tests now pass. The key was to remove the check for `EmbeddedComponentType` in `WalkCompositeComponentIdTree`. It looks to me like `EmbeddedComponentType` is only used by `composite-id`s, so I feel fairly confident that this is a safe change to make. Am I right? Any feedback is appreciated.