parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

fix: LiveQuery throws on `create` event using `Parse.Query.containedIn` with `null` value in array or using `Parse.Query.equalTo` for `Parse.Object` with key value `null`

Open RahulLanjewar93 opened this issue 6 months ago • 7 comments
trafficstars

Pull Request

Issue

Live query throw error if we create subsciption for

  1. ParentObjectQuery.containedIn('childs', [...childs,null]) and a ParentObject is created with ParentObject.set('childs',[newChild]
  2. ParentObjectQuery.equalTo('child', child) and a ParentObject is created with ParentObject.set('child',null)

Closes: FILL_THIS_OUT

Approach

Add not null and not object check before doing the actual checks

Tasks

  • [x] Add tests

Summary by CodeRabbit

  • Tests
    • Added new test cases to ensure live queries involving pointer fields and null values operate reliably without causing server errors or crashes.
  • Bug Fixes
    • Improved stability by adding checks to prevent errors when handling null or undefined pointer values in live queries.

RahulLanjewar93 avatar Apr 30 '25 10:04 RahulLanjewar93