Esempio n. 1
0
printExplain("The objectId is the primary-key of the objects. Is the way to identify this object")
print "The objectId is: ", anyObject.objectId

printSubTitle("createdAt")
printExplain("The createdAt is the date (UTC) when this object was created")
print "The object was created on: ", anyObject.createdAt

printSubTitle("updatedAt")
printExplain("The updatedAt is the last date (UTC) the object was modified")
print "The object last update on: ", anyObject.updatedAt

print "When the object is created, both dates are the same"

printExplain('You can add new fields anytime')

anyObject.otherField = True
anyObject.score = 200

saveToParse(anyObject)
print "The object last update on: ", anyObject.updatedAt

printExplain("In the parse.com Data Browser, you see that is created a table called 'Object'")
print "To have a better name, you need to subclass"

printExplain("If you run this several times, the object will be duplicated")
print """
In contrast with Sql databases, you need to code the constrains/validations yourself"

And check if a object will duplicate or not the data before to save. Parse.com not
have built-in functionality to constrain the data to avoid duplicated objects or anything
related at all. Only provide the storage, and the default fields