         errors: 'object'
         changes: { type: 'collection', setOnce: true }
         lastServerMessage: { type: 'string' }
+        parent: 'state'
+
     derived:
+
         errorMessage:
             deps:['errors'], fn: ->
                 if !@errors then ''


    # True if the model has "name" as eitehr a prop or session attribute
    hasAttribute: (name)->
        !!this._definition[name]

    # Check if an attribute named "name" can be set to "value"
    # Returns an empty string if value, and an appropriate error message if not

            data = this.getAttributes(props:true, true)
        else
            data = this.unsavedAttributes()
        if this.associations && (!_.isEmpty(data) || !this.isNew())
            _.extend(data, this.associations.dataForSave(this, options))
        data


