This was fixed in Hibernate 6. Also see the migration guide notes about this: https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#fetch-circularity-determination