{"record":{"id":"afb396a0711becf4","repo":"filamentphp/filament","slug":"is-operator-can-only-be-used-with-relationship-con","errorCode":null,"errorMessage":"Is operator can only be used with relationship constraints.","messagePattern":"Is operator can only be used with relationship constraints\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/query-builder/src/Constraints/RelationshipConstraint/Operators/IsRelatedToOperator.php","lineNumber":232,"sourceCode":"        // `multiple()`, but any other shape (e.g. a nested array) would reach `whereKey()`\n        // binding and crash the request. Fail closed by discarding non-scalar values.\n        if (is_array($value)) {\n            return array_values(array_filter($value, is_scalar(...)));\n        }\n\n        return is_scalar($value) ? $value : null;\n    }\n\n    public function getConstraint(): ?RelationshipConstraint\n    {\n        $constraint = parent::getConstraint();\n\n        if (! $constraint) {\n            return null;\n        }\n\n        if (! ($constraint instanceof RelationshipConstraint)) {\n            throw new LogicException('Is operator can only be used with relationship constraints.');\n        }\n\n        return $constraint;\n    }\n\n    public function forceSearchCaseInsensitive(bool | Closure | null $condition = true): static\n    {\n        $this->isSearchForcedCaseInsensitive = $condition;\n\n        return $this;\n    }\n\n    public function isSearchForcedCaseInsensitive(): ?bool\n    {\n        return $this->evaluate($this->isSearchForcedCaseInsensitive);\n    }\n\n    public function getModifyRelationshipQueryUsing(): ?Closure","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/query-builder/src/Constraints/RelationshipConstraint/Operators/IsRelatedToOperator.php#L214-L250","documentation":"Error \"Is operator can only be used with relationship constraints.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/query-builder/src/Constraints/RelationshipConstraint/Operators/IsRelatedToOperator.php:232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}