File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/runtime/src/plugins/policy Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -198,13 +198,13 @@ export class ExpressionTransformer<Schema extends SchemaDef> {
198198 private normalizeBinaryOperationOperands ( expr : BinaryExpression , context : ExpressionTransformerContext < Schema > ) {
199199 let normalizedLeft : Expression = expr . left ;
200200 if ( this . isRelationField ( expr . left , context . model ) ) {
201- invariant ( ExpressionUtils . isNull ( expr . right ) ) ;
201+ invariant ( ExpressionUtils . isNull ( expr . right ) , 'only null comparison is supported for relation field' ) ;
202202 const idFields = getIdFields ( this . schema , context . model ) ;
203203 normalizedLeft = this . makeOrAppendMember ( normalizedLeft , idFields [ 0 ] ! ) ;
204204 }
205205 let normalizedRight : Expression = expr . right ;
206206 if ( this . isRelationField ( expr . right , context . model ) ) {
207- invariant ( ExpressionUtils . isNull ( expr . left ) ) ;
207+ invariant ( ExpressionUtils . isNull ( expr . left ) , 'only null comparison is supported for relation field' ) ;
208208 const idFields = getIdFields ( this . schema , context . model ) ;
209209 normalizedRight = this . makeOrAppendMember ( normalizedRight , idFields [ 0 ] ! ) ;
210210 }
You can’t perform that action at this time.
0 commit comments