# Migrating from Hibernate 5 to 6 results in error that target lists have at most 1664 entries

**URL:** <https://discourse.hibernate.org/t/migrating-from-hibernate-5-to-6-results-in-error-that-target-lists-have-at-most-1664-entries/11571>\
**Category:** Hibernate ORM\
**Created:** [June 16, 2025, 9:41am UTC](https://discourse.hibernate.org/t/migrating-from-hibernate-5-to-6-results-in-error-that-target-lists-have-at-most-1664-entries/11571 "2025-06-16T09:41:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [June 18, 2025, 1:17pm UTC](https://discourse.hibernate.org/t/migrating-from-hibernate-5-to-6-results-in-error-that-target-lists-have-at-most-1664-entries/11571/4 "2025-06-18T13:17:00Z")

</div>

This is mentioned in the migration guide for 6.0: [hibernate-orm/migration-guide.adoc at 6.0 · hibernate/hibernate-orm · GitHub](https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#fetch-circularity-determination)

You can either specify a max fetch depth to reduce the amount of joins or even better, try to get rid of EAGER fetching, because it’s a pain and cripples performance.

---

_[View the full topic](https://discourse.hibernate.org/t/migrating-from-hibernate-5-to-6-results-in-error-that-target-lists-have-at-most-1664-entries/11571)._
