The right way to set or get fields
With Archetypes, the field data can be stored in any number of ways, according to the storage attribute of the field. Thus you cannot rely on field values being simple attributes of your objects.
Let's say you have an 'author' field in your schema. Here is the wrong way to reference its data:
authorName = self.author
To ensure you go through the AT storage machinery, this is the right way to reference its data:
authorName = self.getField('author').get(self)
Similarly, to set the field value you would do this:
self.getField('author').set(self, authorName)
Note that if you are getting/setting the field value of something other than self, make sure to pass that instance to get/set, like this:
someObject.getField('author').set(someObject, authorName)
