Having @NotFound(IGNORED) on the “mappedBy” does not make sense; neither does @NotFound(EXCEPTION). @NotFound should only be on the association owner’s side of the association. @Entity public class Person { @Id private Long id; @OneToOne(mappedBy = "person") @NotFound( action = NotFoundAction.IGNORE ) private Employment employment; } @Entity public class Employment { @Id private Long id; @OneToOne @JoinColumn private Person person; } session.find(Person.class, id ) returns a non-null Person entity with a null #city association, as expected. A warning should be logged. |