I created a JUnit for that problem : https://github.com/hibernate/hibernate-orm/pull/1219 The requests on a oneToOne property are always reduced to a query on the primary key of the owning entity. There are lots of cases where that should not be done, when optional for example. In Hibernate documentation 3.x, the oneToOne relationships with foreign key (instead of shared primary key) were also written as oneToOne and the requests were reduced as well, which was really wrong. The other issue, consequence of the reduction I think, is that the entities parameters are not dumped into the query, which is demonstrated by the Junit. |