{"record":{"id":"e9c2181724da53fe","repo":"hibernate/hibernate-orm","slug":"dynamic-map-entity-representation","errorCode":null,"errorMessage":"dynamic-map entity representation","messagePattern":"dynamic-map entity representation","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/proxy/map/MapLazyInitializer.java","lineNumber":29,"sourceCode":"import org.hibernate.proxy.AbstractLazyInitializer;\n\n/**\n * Lazy initializer for \"dynamic-map\" entity representations.\n *\n * @author Gavin King\n */\npublic class MapLazyInitializer extends AbstractLazyInitializer implements Serializable {\n\n\tMapLazyInitializer(String entityName, Object id, SharedSessionContractImplementor session) {\n\t\tsuper( entityName, id, session );\n\t}\n\n\tpublic Map getMap() {\n\t\treturn (Map) getImplementation();\n\t}\n\n\tpublic Class<?> getPersistentClass() {\n\t\tthrow new UnsupportedOperationException(\"dynamic-map entity representation\");\n\t}\n\n\t@Override\n\tpublic Class<?> getImplementationClass() {\n\t\tthrow new UnsupportedOperationException(\"dynamic-map entity representation\");\n\t}\n\n\t// Expose the following methods to MapProxy by overriding them (so that classes in this package see them)\n\n\t@Override\n\tprotected void prepareForPossibleLoadingOutsideTransaction() {\n\t\tsuper.prepareForPossibleLoadingOutsideTransaction();\n\t}\n\n\t@Override\n\tprotected boolean isAllowLoadOutsideTransaction() {\n\t\treturn super.isAllowLoadOutsideTransaction();\n\t}","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/proxy/map/MapLazyInitializer.java#L11-L47","documentation":"Error \"dynamic-map entity representation\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate API is violated.","commonSituations":"Occurs when application code or configuration does not satisfy the documented contract of the API being called.","solutions":["Provide the entity name explicitly for dynamic-map proxies instead of relying on a class name.","Use POJO entity mode if class-based resolution is needed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}