PG: Fix updating mixed array (#5552)
* PG: Fix updating mixed array * Revert "PG: Fix updating mixed array" This reverts commit 5a441413c083747d9e51767be7b2e9298bd4f8ba. * simple fix
This commit is contained in:
@@ -4637,4 +4637,23 @@ describe('Parse.Query testing', () => {
|
||||
const results = await query.find();
|
||||
equal(results[0].get('array'), data2);
|
||||
});
|
||||
|
||||
it('can update mixed array more than 100 elements', async () => {
|
||||
const array = [0, 1.1, 'hello world', { foo: 'bar' }, null];
|
||||
const obj = new TestObject({ array });
|
||||
await obj.save();
|
||||
|
||||
const query = new Parse.Query(TestObject);
|
||||
const result = await query.get(obj.id);
|
||||
equal(result.get('array').length, 5);
|
||||
|
||||
for (let i = 0; i < 100; i += 1) {
|
||||
array.push(i);
|
||||
}
|
||||
obj.set('array', array);
|
||||
await obj.save();
|
||||
|
||||
const results = await query.find();
|
||||
equal(results[0].get('array').length, 105);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user