You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Up until 1.6.14 my code has worked to instantiate my Parse Object attributes.
I'm calling the initialize method backbone-esq (not using the object-arguments style)
A sample: var StudentFriend = Parse.Object.extend("StudentFriend", { fields: [ "street", "number", "postal_code", "city", "email", "phone", "mobile", "description", "skills" ], initialize: function (street, number, postal_code, city, email, phone, mobile, description, skills) { Parse.Object.prototype.initialize.apply(this, arguments); console.log(email); this.street = street; this.number = number; this.postal_code = parseInt(postal_code); this.city = city; this.email = email; this.phone = phone; this.mobile = mobile; this.description = description; this.skills = skills; var acl = new Parse.ACL(ngParse.User.current()); acl.setRoleReadAccess("business", true); acl.setRoleWriteAccess("admin", true); this.setACL(acl); console.log(this); //Met cloudcode moet bij het toevoegen van een vriend een rol worden toegevoegd aan het indiviueel //studentFriend object zodat deze vriend READ access krijgt tot dit object. } }); return StudentFriend;
When logging 'this', up until version 1.6.14 of the javascript SDK, the this object (the parse-object) returned my attributes as the arguments i set them to.
In version 1.6.14, all of the get methodes return undefined (also undefined is being saved to the server)(logging this.attribute returns the set value though)
I do not know why this behaviour has changed since 1.6.14 nor do I know how to adapt my code the work in a similar fashion (calling this.set("param",param) also fails.
The text was updated successfully, but these errors were encountered:
JeffreyDevloo
changed the title
Initializing Parse Object 1.6.14 undefined attributes
Initializing Parse Object SDK 1.6.14 undefined attributes
Mar 1, 2016
Hello
Up until 1.6.14 my code has worked to instantiate my Parse Object attributes.
I'm calling the initialize method backbone-esq (not using the object-arguments style)
A sample:
var StudentFriend = Parse.Object.extend("StudentFriend", { fields: [ "street", "number", "postal_code", "city", "email", "phone", "mobile", "description", "skills" ], initialize: function (street, number, postal_code, city, email, phone, mobile, description, skills) { Parse.Object.prototype.initialize.apply(this, arguments); console.log(email); this.street = street; this.number = number; this.postal_code = parseInt(postal_code); this.city = city; this.email = email; this.phone = phone; this.mobile = mobile; this.description = description; this.skills = skills; var acl = new Parse.ACL(ngParse.User.current()); acl.setRoleReadAccess("business", true); acl.setRoleWriteAccess("admin", true); this.setACL(acl); console.log(this); //Met cloudcode moet bij het toevoegen van een vriend een rol worden toegevoegd aan het indiviueel //studentFriend object zodat deze vriend READ access krijgt tot dit object. } }); return StudentFriend;
When logging 'this', up until version 1.6.14 of the javascript SDK, the this object (the parse-object) returned my attributes as the arguments i set them to.
In version 1.6.14, all of the get methodes return undefined (also undefined is being saved to the server)(logging this.attribute returns the set value though)
I do not know why this behaviour has changed since 1.6.14 nor do I know how to adapt my code the work in a similar fashion (calling this.set("param",param) also fails.
The text was updated successfully, but these errors were encountered: