Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Hibernate Annotations 3.4.0.GA
Hibernate 3.3.1.GA
Name and version of the database you are using:
PostgreSQL 8.2
Description of the Problem:
I ran into a rather perplexing issue where I had a @OneToOne(optional=false, mappedBy="foo") and em.find(...) returned null but a query using select returned the object I wanted. Apparently em.find(...) was using an inner join and the select wasn't, so the object couldn't be returned because the related object was no longer related. Confusing but definitely my fault.
Originally this was going to be a question, but now it's just a warning - yet another reason to avoid @OneToOne! It''s dangerous!