Query on one-to-one property returns incorrect results

Description

Given a pair of classes with a one-to-one relationship, attempting to query for items which do not have a corresponding item in the other class always returns an empty set.

For example, if I have Person and Employee tables a la section 5.1.1 of the manual (http://nhibernate.info/doc/nh/en/index.html#mapping-declaration-onetoone), the HQL query "from Person as person where person.Employee is null" returns an empty result set, even if there are entries in the Person table which do not have corresponding entries in the Employee table.

The attached project illustrates this. It is configured to talk to a local SQL Server 2008 database called "nhibernate", and DDL to initialize the tables is included in the file DDL.sql.

Environment

None

Assignee

Unassigned

Reporter

Neal Groothuis

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure