{"record":{"id":"dada097288420d58","repo":"hibernate/hibernate-orm","slug":"collectionpersister-does-not-implement-collectionm","errorCode":null,"errorMessage":"CollectionPersister does not implement CollectionMutationTarget","messagePattern":"CollectionPersister does not implement CollectionMutationTarget","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/persister/state/internal/AbstractStateManagement.java","lineNumber":215,"sourceCode":"\t\t}\n\t}\n\n\tprotected static boolean isInsertAllowed(CollectionPersister persister) {\n\t\treturn !persister.isInverse() && persister.isRowInsertEnabled();\n\t}\n\n\tprotected boolean isTablePerSubclass(CollectionPersister persister) {\n\t\tfinal var elementPersister = persister.getElementPersister();\n\t\treturn elementPersister != null\n\t\t\t&& elementPersister.hasSubclasses()\n\t\t\t&& elementPersister instanceof UnionSubclassEntityPersister;\n\t}\n\n\tprotected static AbstractCollectionPersister resolveMutationTarget(CollectionPersister persister) {\n\t\tif ( persister instanceof AbstractCollectionPersister collectionMutationTarget ) {\n\t\t\treturn collectionMutationTarget;\n\t\t}\n\t\tthrow new IllegalArgumentException( \"CollectionPersister does not implement CollectionMutationTarget\" );\n\t}\n\n\n\t@Override\n\tpublic AuxiliaryMapping createAuxiliaryMapping(\n\t\t\tEntityPersister persister,\n\t\t\tRootClass bootDescriptor,\n\t\t\tMappingModelCreationProcess creationProcess) {\n\t\treturn null;\n\t}\n\n\t@Override\n\tpublic AuxiliaryMapping createAuxiliaryMapping(\n\t\t\tPluralAttributeMapping pluralAttributeMapping,\n\t\t\tCollection bootDescriptor,\n\t\t\tMappingModelCreationProcess creationProcess) {\n\t\treturn null;\n\t}","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/persister/state/internal/AbstractStateManagement.java#L197-L233","documentation":"Error \"CollectionPersister does not implement CollectionMutationTarget\" 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":["Use a CollectionPersister implementation that implements CollectionMutationTarget (e.g. the standard persisters).","Upgrade the custom collection persister to implement CollectionMutationTarget."],"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"}