         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

        return base + encodeURIComponent(this.getId())


    # Ensures the assocations given in "needed" are loaded
    withAssociations: (names...,options={})->
        if _.isString(options)
            names.push(options); options={}
        scope = options.scope || this
        needed = this.associations.nonLoaded(this,names)
        if _.isEmpty( needed )
            options.success.call(scope, this  ) if options.success
