Hibernate Filter for update statements?

Can Hibernate Filter work with update statements as well? We have a use case where we want to add Filter condition for update queries also.

Do you mean update statements written by you in HQL or the SQL update statements generated by Hibernate internally for flushing changes?

Applying filters to internal SQL statements for flushing is not really useful, as you shouldn’t be able to select the data in the first place when you did everything right.

Applying filters to HQL might be interesting, but this kind of distance at action might just as well be confusing, so I think that doing this would not be the best idea.

how to add filter to each native query which execute using entityManager?
want to add dynamic user_id according to user

You can’t do that with native queries. Hibernate ORM does not understand the structure of native queries, so it also can’t add predicates.