{"record":{"id":"1229434847150c35","repo":"hibernate/hibernate-orm","slug":"collection-path-is-an-association-with-no-join-122943","errorCode":null,"errorMessage":"Collection '<path>' is an association with no join table and may not have a '@FilterJoinTable'","messagePattern":"Collection '<path>' is an association with no join table and may not have a '@FilterJoinTable'","errorType":"exception","errorClass":"AnnotationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/model/internal/CollectionBinder.java","lineNumber":1861,"sourceCode":"\t\t);\n\t\treturn restrictionOnClass != null ? restrictionOnClass.value() : null;\n\t}\n\n\tprivate void addFilterJoinTable(boolean hasAssociationTable, FilterJoinTable filter) {\n\t\tif ( hasAssociationTable ) {\n\t\t\tfinal Map<String,String> aliasTableMap = new HashMap<>();\n\t\t\tfinal Map<String,String> aliasEntityMap = new HashMap<>();\n\t\t\tfillAliasMaps( filter.aliases(), aliasTableMap, aliasEntityMap );\n\t\t\tcollection.addFilter(\n\t\t\t\t\tfilter.name(),\n\t\t\t\t\tgetFilterConditionForJoinTable( filter ),\n\t\t\t\t\tfilter.deduceAliasInjectionPoints(),\n\t\t\t\t\taliasTableMap,\n\t\t\t\t\taliasEntityMap\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tthrow new AnnotationException( \"Collection '\" + qualify( propertyHolder.getPath(), propertyName )\n\t\t\t\t\t+ \"' is an association with no join table and may not have a '@FilterJoinTable'\" );\n\t\t}\n\t}\n\n\tprivate String getFilterConditionForJoinTable(FilterJoinTable filterJoinTableAnnotation) {\n\t\tfinal String condition = filterJoinTableAnnotation.condition();\n\t\treturn condition.isBlank()\n\t\t\t\t? getDefaultFilterCondition( filterJoinTableAnnotation.name(), filterJoinTableAnnotation )\n\t\t\t\t: condition;\n\t}\n\n\tprivate String getFilterCondition(Filter filter) {\n\t\tfinal String condition = filter.condition();\n\t\treturn condition.isBlank()\n\t\t\t\t? getDefaultFilterCondition( filter.name(), filter )\n\t\t\t\t: condition;\n\t}\n","sourceCodeStart":1843,"sourceCodeEnd":1879,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/model/internal/CollectionBinder.java#L1843-L1879","documentation":"Error \"Collection '<path>' is an association with no join table and may not have a '@FilterJoinTable'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A @Filter/@FilterJoinTable usage references an undefined filter or has no usable condition.","commonSituations":"@Filter used without a matching @FilterDef, a misspelled filter name, or neither the usage nor the FilterDef supplying a default condition.","solutions":["Remove @FilterJoinTable from the association, since it has no join table.","Or configure a join table for the association if join-table filtering 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"}