# Using = any(:array) with Hibernate 6.4.4 on PostgreSQL 16

**URL:** <https://discourse.hibernate.org/t/using-any-array-with-hibernate-6-4-4-on-postgresql-16/10977>\
**Category:** Hibernate ORM\
**Created:** [January 31, 2025, 4:51pm UTC](https://discourse.hibernate.org/t/using-any-array-with-hibernate-6-4-4-on-postgresql-16/10977 "2025-01-31T16:51:05Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![papegaaij](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/papegaaij/32/2112_2.png) [@papegaaij](https://discourse.hibernate.org/u/papegaaij)\
**Post date:** [February 4, 2025, 12:03pm UTC](https://discourse.hibernate.org/t/using-any-array-with-hibernate-6-4-4-on-postgresql-16/10977/5 "2025-02-04T12:03:47Z")

</div>

That’s exactly my point: I do not want to use `@>`, I want to use `= any`, but I can’t find a way to do that via the criteria API. In [Using PostgreSQL's = ANY(array) syntax with Hibernate 6.2.9](https://discourse.hibernate.org/t/using-postgresqls-any-array-syntax-with-hibernate-6-2-9/8460) the suggestion was made to use `array_contains`, but that doesn’t give me `= any`. So how do I get `= any` via the criteria API? Hibernate internally does use `= any` for batch fetching, so the construct exists.

---

_[View the full topic](https://discourse.hibernate.org/t/using-any-array-with-hibernate-6-4-4-on-postgresql-16/10977)._
