{"record":{"id":"5e6b51734722829c","repo":"hasura/graphql-engine","slug":"model-model-has-source-data-connector-object-ty","errorCode":null,"errorMessage":"Model {model:} has source data connector object type {model_data_connector_object_type:} but its filter expression type {filter_expression_type:} is backed by data connector {filter_expression_data_connector_object_type:}","messagePattern":"Model (.+?) has source data connector object type (.+?) but its filter expression type (.+?) is backed by data connector (.+?)","errorType":"validation","errorClass":"BooleanExpressionError::DifferentDataConnectorObjectTypeInFilterExpression","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/boolean_expressions/error.rs","lineNumber":180,"sourceCode":"\n    #[error(\n        \"Target model {model_name:} not found, referenced in relationship {relationship_name:}\"\n    )]\n    TargetModelNotFound {\n        relationship_name: RelationshipName,\n        model_name: Qualified<ModelName>,\n    },\n\n    #[error(\n        \"Model {model:} has source data connector {model_data_connector:} but its filter expression type {filter_expression_type:} is backed by data connector {filter_expression_data_connector:}\"\n    )]\n    DifferentDataConnectorInFilterExpression {\n        model: Qualified<ModelName>,\n        model_data_connector: Qualified<DataConnectorName>,\n        filter_expression_type: Qualified<CustomTypeName>,\n        filter_expression_data_connector: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"Model {model:} has source data connector object type {model_data_connector_object_type:} but its filter expression type {filter_expression_type:} is backed by data connector {filter_expression_data_connector_object_type:}\"\n    )]\n    DifferentDataConnectorObjectTypeInFilterExpression {\n        model: Qualified<ModelName>,\n        model_data_connector_object_type: DataConnectorObjectType,\n        filter_expression_type: Qualified<CustomTypeName>,\n        filter_expression_data_connector_object_type: DataConnectorObjectType,\n    },\n\n    #[error(\n        \"The relationship '{relationship_name}' cannot be used as a comparable relationship in boolean expression type '{boolean_expression_type_name}' because it is a remote relationship with an argument mapping target. Relationship '{relationship_name}' on type '{source_type}' has source field '{source_field}' mapped to target argument '{target_argument}'\"\n    )]\n    RemoteComparableRelationshipWithArgumentMappingTargetNotSupported {\n        boolean_expression_type_name: Qualified<CustomTypeName>,\n        relationship_name: open_dds::relationships::RelationshipName,\n        source_type: Qualified<CustomTypeName>,\n        source_field: FieldName,\n        target_argument: open_dds::query::ArgumentName,","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/boolean_expressions/error.rs#L162-L198","documentation":"Same connector-consistency rule as the data connector variant, but at the object-type level: the model's source data connector object type (collection/table mapping) differs from the data connector object type backing the filter expression type.","triggerScenarios":"A booleanExpressionType whose underlying data connector object type name (e.g. a different table/collection mapping) does not match the object type of the model's source, even within the same connector.","commonSituations":"Reusing a filter type generated for a different table of the same connector; renaming a table in the source without updating the boolean expression type; manually editing data connector object type references.","solutions":["Regenerate or update the boolean expression type so its backing data connector object type matches the model's source object type","If the source object type was renamed, update the boolean expression type's reference to the new name"],"exampleFix":"// before: filter type backed by object type 'albums_v1', source table 'albums'\n// after: regenerate the boolean expression type against 'albums' so both match","handlingStrategy":"validation","validationCode":"const sourceObjType = objectTypeOf(model.source);\nif (boolExpObjectType(boolExpType) !== sourceObjType) {\n  fail(`object type mismatch: model=${sourceObjType} filter=${boolExpObjectType(boolExpType)}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate filter types whenever a table/collection mapping changes","Treat object type names as part of the connector contract and update references on rename"],"tags":["hasura","data-connector","object-type","boolean-expression","metadata"],"backgroundTag":"connector-configuration-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}