{"record":{"id":"dcaa0b65bc61e90a","repo":"hibernate/hibernate-orm","slug":"no-row-with-the-given-identifier-exists-for-entity-dcaa0b","errorCode":null,"errorMessage":"No row with the given identifier exists for entity {}","messagePattern":"No row with the given identifier exists for entity (.+?)","errorType":"exception","errorClass":"ObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/internal/StandardEntityNotFoundDelegate.java","lineNumber":24,"sourceCode":"\nimport org.hibernate.ObjectNotFoundException;\nimport org.hibernate.proxy.EntityNotFoundDelegate;\n\n/**\n * Standard non-JPA implementation of {@link EntityNotFoundDelegate},\n * throwing the Hibernate-specific {@link ObjectNotFoundException}.\n *\n * @author Steve Ebersole\n */\npublic class StandardEntityNotFoundDelegate implements EntityNotFoundDelegate {\n\t/**\n\t * Singleton access\n\t */\n\tpublic static final StandardEntityNotFoundDelegate INSTANCE = new StandardEntityNotFoundDelegate();\n\n\t@Override\n\tpublic void handleEntityNotFound(String entityName, Object id) {\n\t\tthrow new ObjectNotFoundException( entityName, id );\n\t}\n}\n","sourceCodeStart":6,"sourceCodeEnd":27,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/internal/StandardEntityNotFoundDelegate.java#L6-L27","documentation":"Standard non-JPA EntityNotFoundDelegate: invoked when a lazy proxy or internal load discovers that the row for the given identifier no longer exists in the database. It converts that discovery into an ObjectNotFoundException carrying entity name and id.","triggerScenarios":"Loading an entity by id finds no row and the delegate is configured to fail.","commonSituations":"EntityNotFoundException from a broken to-one association referencing a deleted row, or getReference on a nonexistent id.","solutions":["Verify the row with the given identifier actually exists in the database before loading.","Use Session.get() (returns null) instead of load()/byId() with proxy if a missing row is an acceptable case, or handle EntityNotFoundException.","Check for filter, tenant, or caching configurations that hide or stale the row, and for wrong identifier type/value mapping."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}