Issues
- Metamodel imports cache increases indefinitely for dynamically generated HQL aliases eventually leading to an OOMHHH-14948Resolved issue: HHH-14948Ivaylo Mitrev
- @OneToOne declared as an interface in an entity and using @MapsId failsHHH-14795
- Exception during multiload leaves EntityManager / Session and entities in an invalid stateHHH-14775Resolved issue: HHH-14775
- PGGeometryTypeDescriptor returns unknown sql type 5432HHH-14683Resolved issue: HHH-14683Karel Maesen
- Failing to save objects to db with @GeneratedValue(IDENTITY) and bidirectional @OneToManyHHH-14671
- Byte code enhancement via Gradle plugin failsHHH-14657Resolved issue: HHH-14657Markus Heiden
- geolatte-geom Geometry types no longer works with geography column typesHHH-14654Resolved issue: HHH-14654Karel Maesen
- Wrong query using filter and entity inheritanceHHH-14639Resolved issue: HHH-14639
- java.lang.ClassNotFoundException and Java 14 Support for Hibernate 5.4.31HHH-14638
- Persistence.generateSchema() does not release connections to the database server.HHH-14629
- org.hibernate.mapping.PersistentClass#getProperty does not support composite idsHHH-14627
- Oracle from version 12 started supporting the `offset ? rows fetch next ? rows only`syntax for paginationHHH-14624Resolved issue: HHH-14624Andrea Boriero
- ClassCastException because collection of uninitialized proxy is dirty checkedHHH-14619Resolved issue: HHH-14619Christian Beikov
- Optimistic Lock throws org.hibernate.exception.SQLGrammarException: could not retrieve versionHHH-14616Resolved issue: HHH-14616Andrea Boriero
- Merge causes StackOverflow when JPA proxy compliance is enabledHHH-14608Resolved issue: HHH-14608Andrea Boriero
- Regression bug: could not resolve property: null of:HHH-14597Resolved issue: HHH-14597Christian Beikov
- HibernateException while working with version, cache and lazy loadingHHH-14595
- HQL order by size projection aliasHHH-14594
- JavaAssistProxy, wildfly modules and class loaders.HHH-14593
- Entity with Embedded Object is always marked as dirtyHHH-14591
- Join not rendered when requested for embedded in secondary table if a single column is selected using the Criteria APIHHH-14590
- improve CONTRIBUTING.mdHHH-14586Resolved issue: HHH-14586Nathan Xu
- Allow PhysicalNamingStrategy implementations to detect when a name is implicit or explicitHHH-14584
- misleading error: should be mapped with insert="false" update="false"HHH-14580
- @NamedNativeQueries broken on @MappedSuperclass abstract classesHHH-14572
- Support binding null UUID sql parameter with PostgreSQLHHH-14358Resolved issue: HHH-14358Jan Schatteman
26 of 26
caches failed imports (with an empty string instance) in
MetamodelImpl
with the intention of avoiding exceptions every time an unknown class name reachesMetamodelImpl#getImportedClassName
.My experience with Hibernate, however, shows that the target entity being joined with is also sent to said method.
For example, in the following HQL query:
e.relatedEntity
will be passed togetImportedClass
asprocess
will evaluate to true (e is a valid Java identifier and the surrounding tokens also pass the validation). That’s probably not an issue for hard-coded queries for which the join target will always remaine.relatedEntity
and which would lead to adding just this one additionale.relatedEntity --> ””
node to the map.The problem for us, however, is that our application dynamically generates random aliases in HQL queries (due to these queries being dynamically built). Such dynamically generated entity aliases end up being added to the imports map with an empty string value. As a result, the
imports
map inMetamodelImpl
constantly grows, eventually leading to an OOM for our applications as this isn't session-specific cache and as I have not been able to find any way of clearing the failed imports.I could not find any information in the documentation stating that our approach with dynamic aliases is incorrect and decided to raise a ticket considering the severity of the issue for us. I would assume that either failed imports need not be cached after all (for memory reasons) or this method need not be invoked for them.
PR: