hibernate-orm icon indicating copy to clipboard operation
hibernate-orm copied to clipboard

HHH-19565 @SQLRestriction should not be applied to a @ManyToOne

Open gavinking opened this issue 6 months ago • 1 comments

Reverts to the behavior prior to H6.2, where @Where a.k.a. @SQLRestriction did not affect @OneToMany association fetching.

This change continues to add the restriction when:

  1. the @OneToMany is mapped to a @JoinTable, or
  2. when it's the unowned end of a @OneToOne mapped to a FK.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion. For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19565

gavinking avatar Jun 20 '25 19:06 gavinking

@sebersole Im not proposing to merge this as-is.

gavinking avatar Oct 07 '25 12:10 gavinking