So I dunno, the situation here is pretty weird. There actually is one test that looks superficially like it exercises @NotFound on a collection, but it’s pretty weird case with a @OneToMany. (I really don’t see how @NotFound could possibly make sense for @OneToMany.) The test is JoinFormulaOneToManyNotIgnoreLazyFetchingTest which, despite its name, has nothing to of with @JoinFormula. And I can make this test pass just by using @OneToMany(fetch = FetchType.EAGER) instead of @NotFound, so it doesn’t look like a legit test for @NotFound at all! So, AFAICT, this test is just bogus, and should never have been pushed. The referenced issue in the test is https://hibernate.atlassian.net/browse/HHH-12770, and it looks like it was written by a user and pushed by Vlad as part of this PR: https://github.com/hibernate/hibernate-orm/pull/2459. Apart from that bogus-looking test, there’s no test for @NotFound on a collection. |