Skip to content

Initializing Parse Object SDK 1.6.14 undefined attributes #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JeffreyDevloo opened this issue Mar 1, 2016 · 3 comments
Closed

Initializing Parse Object SDK 1.6.14 undefined attributes #216

JeffreyDevloo opened this issue Mar 1, 2016 · 3 comments

Comments

@JeffreyDevloo
Copy link

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.

@JeffreyDevloo JeffreyDevloo changed the title Initializing Parse Object 1.6.14 undefined attributes Initializing Parse Object SDK 1.6.14 undefined attributes Mar 1, 2016
@simonaberry
Copy link

did you ever figure out how to solve this ?

@simonaberry
Copy link

rasied again as #322, fixed in 03d14a0

@dplewis
Copy link
Member

dplewis commented Sep 14, 2018

Closed via 03d14a0

@dplewis dplewis closed this as completed Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants