cloudboost icon indicating copy to clipboard operation
cloudboost copied to clipboard

Duplicate CloudObjects in List

Open RTBathula opened this issue 10 years ago • 3 comments

i added 2 same cloudObjects in list.

and after when i form normal Find Query, cloudObject is returning TWO same records in the LIST

RTBathula avatar Feb 25 '16 14:02 RTBathula

Hey please can you provide more information about the issue screenshoots would be more helpful

kbuhiire avatar Mar 10 '16 13:03 kbuhiire

Hey Ken,

This issue is about the list of relations. Let me give you an example :

var parent = new CB.CloudObject('Parent');

var child = new CB.CloudObject('Child');

parent.set('children',[child,child]);

parent.save().then(function(parent){
console.log(parent.get('children')); //here it gives you [child,child] which is correct. But same objects cannot be added twice in an array. It should ideally return [child]
});

nawazdhandala avatar Mar 10 '16 14:03 nawazdhandala

Fixed

RTBathula avatar Apr 01 '16 19:04 RTBathula