Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-16830 (
https://hibernate.atlassian.net/browse/HHH-16830?atlOrigin=eyJpIjoiOWMwNj...
)
Re: apply filters to 'find()' method (
https://hibernate.atlassian.net/browse/HHH-16830?atlOrigin=eyJpIjoiOWMwNj...
)
Filters were originally designed as a generic data filtering feature - specifically, they
were never meant to affect cardinality as you mention. Therefore, it absolutely made sense
to not apply them in various cases. The intention was always that once you had a
particular id, filters were no longer needed.
Discriminated multi-tenancy support was implemented using filters, which introduces a
specific requirement that is at odds with that original intention and specifically might
very well need to affect cardinality - it is conceivable/likely that the tenant-id is part
of the real unique identification.
So we do need to allow some facility for users to apply filters in these find-by-id cases
for sure. In my opinion this should be opt-in behavior - we should not break existing
applications which have been using filters.
And then there is also a “granularity” aspects - i.e., is this a global setting versus an
attribute on @Filter(Def) ? Here, I am not sure. Outside of specific evidence, I would say
it is best to start global (setting).
(
https://hibernate.atlassian.net/browse/HHH-16830#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16830#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:6a5b8c4 )